3D Text label OnPlayerDeath
#8

PHP код:
new CanArmor[MAX_PLAYERS],timer[MAX_PLAYERS];
public 
OnPlayerSpawn(playerid)
{
    
timer[playerid] = SetTimerEx("CanArmorTimer",60000,0,"i",playerid); // How long before you can /armor
    
CanArmor[playerid] = 0;
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    
KillTimer(timer[playerid]);
    return 
1;
}
forward CanArmorTimer(playerid);
public 
CanArmorTimer(playerid)
{
    
SendClientMessage(playerid, -1"You can now buy armor!(/Armor)");
    
CanArmor[playerid] = 1;
}
CMD:armor(playerid,params[])
{
    if(
CanArmor[playerid] == 1)
    {
            
SendClientMessage(playeridCOLOR_GREEN"You have bought extra armor!");
            
SetPlayerArmour(playerid100);
             
CanArmor[playerid] = 0;
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"You can not buy extra armor yet!");
        }
    return 
1;

you did not name the timer for kill it, look above
PHP код:
timer[MAX_PLAYERS];
timer[playerid] = SetTimerEx(....);
KillTimer(timer[playerid); 
if you use just new timer; and killtimer(timer); // on kill timer all players timer will be disabled then if you just spawned and other player dies you will never can use /armor xd xp hope i helped
Reply


Messages In This Thread
3D Text label OnPlayerDeath - by Counterafk - 21.10.2015, 14:11
AW: 3D Text label OnPlayerDeath - by Kaliber - 21.10.2015, 21:51
Re: 3D Text label OnPlayerDeath - by Vince - 21.10.2015, 21:59
Re: 3D Text label OnPlayerDeath - by Counterafk - 22.10.2015, 19:02
Re: 3D Text label OnPlayerDeath - by J0sh... - 22.10.2015, 19:07
Re: 3D Text label OnPlayerDeath - by AbyssMorgan - 22.10.2015, 19:12
Re: 3D Text label OnPlayerDeath - by Counterafk - 22.10.2015, 22:50
Re: 3D Text label OnPlayerDeath - by jlalt - 23.10.2015, 07:56
Re: 3D Text label OnPlayerDeath - by Counterafk - 23.10.2015, 11:33

Forum Jump:


Users browsing this thread: 1 Guest(s)