SA-MP Forums Archive
OnPlayerDeath - 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: OnPlayerDeath (/showthread.php?tid=419939)



OnPlayerDeath - Youtube12 - 02.03.2013

Hi guys, when I kill someone in my server, i become $5000 and lost the $5000 in the same time.

My code:

Код:
        SendDeathMessage(killerid,playerid,reason);
	SetPlayerScore(killerid,GetPlayerScore(killerid)+2);
	GivePlayerMoney(killerid,5000);
  	GameTextForPlayer(killerid,"~g~+$5000",5000,1);
	SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
	GivePlayerMoney(playerid, -2000);
	GameTextForPlayer(playerid,"~r~-$2000",5000,1);



Re: OnPlayerDeath - CaRa - 02.03.2013

I don't understand what you want to say. What do you want to give you when you kill someone ?


AW: OnPlayerDeath - Youtube12 - 02.03.2013

No, I mean when u kill someone, u become $5000 but after 1second u will lose the $5000


Re: OnPlayerDeath - Azazelo - 02.03.2013

Do you have money anty-cheat code in you script ?


AW: OnPlayerDeath - Youtube12 - 02.03.2013

yes i have!


Re: OnPlayerDeath - L.Hudson - 03.03.2013

most likely the problem is the anticheat since it doesnt support GivePlayerMoney, try searching similar callbacks to GivePlayerMoney and are supported by the anticheat in your gamemode