Showing Error Message On Using Commands
#2

Try this.

PHP код:
COMMAND:setarmour(playerid,params[]) 

    if(
PlayerInfo[playerid][pSpawned] != 1
    { 
        if(
PlayerInfo[playerid][pAdminLevel] > 0
        { 
            new 
TargetIDFloat:Armourstring[128]; 
            if(
sscanf(params,"uf"TargetIDArmour)) 
            { 
                
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /setarmour [playerid] [Armour]"); 
            }
            return 
1
        } 

        if(!
IsPlayerConnected(TargetID) || TargetID == INVALID_PLAYER_ID
        { 
            
SendClientMessage(playeridCOLOR_ERROR"That Player Is Not Connected."); 
            return 
1
        }     

        if(
Armour || Armour 100
        { 
            
SendClientMessage(playeridCOLOR_ERROR"Armour Can't Be Less Than 0 or More Than 100."); 
            return 
1
        } 

        
SetPlayerArmour(TargetID,Armour); 
        
GameTextForPlayer(TargetID,"~r~Armour Set By Admin"30003); 

        
format(string,sizeof(string),"***ARMOUR: %s (%d) (ADMIN SETARMOUR) Has Been Set."PlayerInfo[TargetID][pName], TargetID); 
        
SendClientMessageToAll(COLOR_ADMINstring); 
    }
    else
    { 
        
SendClientMessage(playeridCOLOR_ERROR"You Cannot Use This Command While You're Dead."); 
    } 
    return 
1

Reply


Messages In This Thread
Showing Error Message On Using Commands - by Devon007 - 20.05.2015, 16:36
Re: Showing Error Message On Using Commands - by rappy93 - 20.05.2015, 17:05
Re: Showing Error Message On Using Commands - by 7Ahmad7 - 20.05.2015, 23:18
Re: Showing Error Message On Using Commands - by X337 - 21.05.2015, 01:30
Re: Showing Error Message On Using Commands - by Devon007 - 21.05.2015, 04:00

Forum Jump:


Users browsing this thread: 1 Guest(s)