10.02.2012, 12:01
You could use a variable to check wether they used one of those commands (IE: playerKilledSelf[MAX_PLAYERS]) and at OnPlayerDeath check if its 1 or 0, if it was 1 don't take money.
Just a simple example of one way to do this
PHP код:
new playerKilledSelf[MAX_PLAYERS];
if(!strcmp(cmdtext, "/kill", true))
{
playerKilledSelf[playerid] = 1;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerKilledSelf[playerid] == 1)
{
playerKilledSelf[playerid] = 0;
}
else
{
GivePlayerMoney(playerid, -500);
}
}