31.07.2015, 22:44
So I want to give money to a player automatically when he dies, meaning I want to save it into his variable right away so nobody can hack money. I could use GivePlayerMoney to give a player the money then when he disconnects I can save it to the variable but I don't know how to save it into a variable directly.
If you don't understand what I'm asking by now, I'm trying to add, for example, 500$ directly to the killer's money variable (PlayerInfo[killerid][Money]) so technically he wouldn't even see his money increase.. How would I do that?
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[killerid][pKills]++;
PlayerInfo[playerid][pDeaths]++;
SendDeathMessage(killerid, playerid, reason);
return 1;
}
If you don't understand what I'm asking by now, I'm trying to add, for example, 500$ directly to the killer's money variable (PlayerInfo[killerid][Money]) so technically he wouldn't even see his money increase.. How would I do that?
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[killerid][pKills]++;
PlayerInfo[playerid][pDeaths]++;
SendDeathMessage(killerid, playerid, reason);
return 1;
}