How to make players now lose money on death
#2

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.

PHP код:
new playerKilledSelf[MAX_PLAYERS];
if(!
strcmp(cmdtext"/kill"true))
{
     
playerKilledSelf[playerid] = 1;
     return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    if(
playerKilledSelf[playerid] == 1)
    {
        
playerKilledSelf[playerid] = 0;
    }
    else
    {
      
GivePlayerMoney(playerid, -500);
     }

Just a simple example of one way to do this
Reply


Messages In This Thread
How to make players now lose money on death - by malcomjones - 10.02.2012, 11:56
Re: How to make players now lose money on death - by Think - 10.02.2012, 12:01
Re: How to make players now lose money on death - by Konstantinos - 10.02.2012, 12:04
Re: How to make players now lose money on death - by malcomjones - 10.02.2012, 21:06
Re: How to make players now lose money on death - by [LoF]Zak - 10.02.2012, 21:14
Re: How to make players now lose money on death - by malcomjones - 10.02.2012, 21:17
Re : How to make players now lose money on death - by ricardo178 - 10.02.2012, 23:16

Forum Jump:


Users browsing this thread: 1 Guest(s)