i need help! - 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: i need help! (
/showthread.php?tid=587251)
i need help! -
darkhunter332 - 29.08.2015
I Need a system in which when i kill any Player i should get 1 score (without getting cash)
(Also if i do /kill i won't get score)
I will appreciate if someone will help me
Re: i need help! -
MarvinPWN - 29.08.2015
Put this into OnPlayerDeath.
PHP код:
if(killerid != INVALID_PLAYER_ID)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
}
Re: i need help! -
darkhunter332 - 29.08.2015
I dont have OnPlayerDeath,
How does it looks like with the code?
Re: i need help! -
darkhunter332 - 29.08.2015
Oh nvm,I fixed it,
Thanks for your help!
Re: i need help! -
ahameed4755 - 29.08.2015
try this
Код:
public OnPlayerDeath(killerid,playerid,reason)
{
setplayerscore(killerid, GetPlayerScore(killerid)+1)// (killerid)1) should work too i think
return 1;
}
Re: i need help! -
MarvinPWN - 31.08.2015
@ahameed4755:
If you use your code, the server will crash if you do suicide (INVALID_PLAYER_ID => 65535 => MAX_PLAYERS => 499 (0-499)).