/sethp and /setarmor
#1

Hey guys i made this commmand but i am new in this lenguage of pawn and i dont know why my comands still not working i have no errors or warnings but always i use /sethp always kill me and never put the % of life i want to give...and with /sethp nothing happens, what can i do? by the way sorry for my bad english

this is my code :

PHP код:
CMD:sethp(playerid,params[])
    {
        if(
IsPlayerConnected(playerid))
        {
           new 
id,Float:c;
        if(
sscanf(params,"rf",id,c))
        {
        
SendClientMessage(playeridCOLOR_GRAD"USAGE: /sethp [Playerid/PartOfName] [Health]");
        return 
1;
        }
        if (
PlayerInfo[playerid][pAdmin] >= 4)
        {
          if(
IsPlayerConnected(id))
        {
         if(
id!= INVALID_PLAYER_ID)
          {
        
SetPlayerHealth(idc);
        }
        }
        }
        else
        {
          
SendClientMessage(playeridCOLOR_GRAD"You are not authorized to use that command!");
        }
        }
        return 
1;
    }
CMD:setarmor(playerid,params[])
    {
        if(
IsPlayerConnected(playerid))
        {
         new 
id,Float:c;
        if(
sscanf(params,"rf",id,c))
        {
        
SendClientMessage(playeridCOLOR_GRAD"USAGE: /setarmor [Playerid/PartOfName] [Armor]");
        return 
1;
        }
        if (
PlayerInfo[playerid][pAdmin] >= 4)
        {
          if(
IsPlayerConnected(id))
        {
         if(
id!= INVALID_PLAYER_ID)
          {
        
SetPlayerArmour(idc);
        }
        }
        }
        else
        {
          
SendClientMessage(playeridCOLOR_GRAD"You are not authorized to use that command!");
        }
        }
        return 
1;
    } 
Reply


Messages In This Thread
/sethp and /setarmor - by Jaua10 - 02.10.2017, 02:33
Re: /sethp and /setarmor - by MEW273 - 02.10.2017, 03:02
Re: /sethp and /setarmor - by Jaua10 - 02.10.2017, 03:19
Re: /sethp and /setarmor - by Swankeh - 02.10.2017, 03:37
Re: /sethp and /setarmor - by Jaua10 - 02.10.2017, 04:32

Forum Jump:


Users browsing this thread: 2 Guest(s)