PDA

View Full Version : OnPlayerDeath


Youtube12
02/03/2013, 10:29 PM
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);

CaRa
02/03/2013, 10:34 PM
I don't understand what you want to say. What do you want to give you when you kill someone ?

Youtube12
02/03/2013, 10:37 PM
No, I mean when u kill someone, u become $5000 but after 1second u will lose the $5000

Azazelo
02/03/2013, 10:39 PM
Do you have money anty-cheat code in you script ?

Youtube12
02/03/2013, 10:48 PM
yes i have!

L.Hudson
03/03/2013, 08:26 AM
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