SA-MP Forums Archive
Need some help with this - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need some help with this (/showthread.php?tid=363189)



Need some help with this - UnlimitedFreeroam - 26.07.2012

Hello Everyone,

I have downloaded a basic script to script more on it.
I need one thing, im using lLuxAdmin1.6 and just a normal freeroam script.
I want that if someone is killing another player then he will receive +1 score and 5K cash.
But i dont how how and where to change this.
Im just a beginner so thanks.


Re: Need some help with this - Glint - 26.07.2012

Under your OnPlayerDeath(playerid, killerid) add GivePlayerMoney(playerid, 5000) and about the score you don't need it because it already +1's your score.


Re: Need some help with this - UnlimitedFreeroam - 26.07.2012

By me it isnt adding my score


Re: Need some help with this - Kakioshe22 - 26.07.2012

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
GivePlayerMoney(killerid,5000);
    
GivePlayerMoney(playerid,GetPlayerMoney(playerid)-1000);
    
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
    
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
    return 
1;