Infinity health cmd ! pls help
#2

PHP код:
    new hp// top
    
if(strcmp(cmd"/aod"true) == 0)
    {
        if (
PlayerInfo[playerid][pAdmin] >= 1)
           {
            if(
AdminDuty[playerid] == 1)
            {
                       
GetPlayerName(playeridsendernamesizeof(sendername));
                       
format(stringsizeof(string), "Admin %s is now off duty."sendername,playerid);
                       
SendClientMessageToAll(COLOR_DBLUE,string);
                          
AdminDuty[playerid] = 0;
                       
SetPlayerHealth(playerid,100);
                       
SetPlayerArmour(playerid,0);
                       
SetPlayerToTeamColor(playerid);
                       
KillTimer(hp);
            }
            else
            {
                
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "Admin %s is now on duty.",sendername,playerid);
                
SendClientMessageToAll(0xFAAFBEFF,string);
                   
AdminDuty[playerid] = 1;
                
SetPlayerHealth(playerid,100);
                
SetPlayerArmour(playerid,100);
                
hp SetTimer("Infinity"5001); // <-----------------
                
SetPlayerColor(playerid,0xFAAFBEFF);
                for(new 
0MAX_PLAYERS++)
                {
                        if(
IsPlayerConnected(i))
                        {
                          
SetPlayerMarkerForPlayeri,playerid,0xFAAFBEFF );
                        }
                }
            }
        }
        else
        {
            
SendClientMessage(playerid,COLOR_GREY,"Your not an admin !");
        }
        return 
1;
    }
    
forward Infinity(playerid);
    public 
Infinity(playerid)
    {
        
SetPlayerHealth(playerid10000);
        
SetPlayerArmour(playerid10000);
    } 
Reply


Messages In This Thread
Infinity health cmd ! pls help - by xLw - 15.09.2011, 19:06
Re: Infinity health cmd ! pls help - by Jafet_Macario - 15.09.2011, 19:12

Forum Jump:


Users browsing this thread: 1 Guest(s)