Sign in to follow this  
Russian#37

[مساعدة] !

Recommended Posts

جيت اضيف 

addEventHandler("onPlayerWasted",root,function(_,killer)
 local num = math.random(1000,2500) 
     if ( killer ) and ( killer ~= source ) then
        givePlayerMoney(killer,tonumber(num)) 
        outputChatBox ( "You Got "..tostring(num).." ! ",killer,0,255,0)
     end
 end )

 

عشان لما اقتل لاعب يعطيني فلوس وماظبط وش الخطأ

Edited by Russian#37

Share this post


Link to post

يا ليت تستخدم <> عشان نقدر نقرأ الاكواد .

اشوف الكود تمام  .. شوف الديبوق في اي اخطاء من السكربت !

+ tostring - tonumber ما يحتاج تستخدم

  • Like 1

Share this post


Link to post
1 hour ago, #_iMr.[E]coo said:

addEventHandler ( 'onPlayerWasted' , root ,
  function( _ , aAttacker_ )
    if ( aAttacker_ ) and ( aAttacker_ ~= source ) then
      if ( getElementType ( source ) == 'player' and getElementType ( aAttacker_ ) == 'player' ) then
        givePlayerMoney ( aAttacker_ , math.random ( 1000 , 2500 )  ) 
      end
    end
  end 
)

 

 

ماظبط اخي , للعلم السيرفر دايز

Share this post


Link to post
4 minutes ago, Russian#37 said:

ماظبط اخي , للعلم السيرفر دايز

حاطه بملف سيرفر 

Share this post


Link to post
1 hour ago, #_iMr.[E]coo said:

حاطه بملف سيرفر 

خلاص , شكرا اخوي حليت المشكلة :x

Share this post


Link to post
3 hours ago, #_iMr.[E]coo said:

addEventHandler ( 'onPlayerWasted' , root ,
  function( _ , aAttacker_ )
    if ( aAttacker_ ) and ( aAttacker_ ~= source ) then
      if ( getElementType ( source ) == 'player' and getElementType ( aAttacker_ ) == 'player' ) then
        givePlayerMoney ( aAttacker_ , math.random ( 1000 , 2500 )  ) 
      end
    end
  end 
)

 

 

getElementType ( source ) == 'player'

'onPlayerWasted

 

 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • Like 1

Share this post


Link to post
1 hour ago, #_iMr.[E]coo said:

ذذ خلنا نتحقق اكثر :D

مو شرط لان الحدث للاعبين بس -_-

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.