[Tutorial] Creating a /sethp command
#4

pawn Code:
CMD:sethp(playerid,params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not authorized to use this command!");
    new Float:Health, PID;
    if(sscanf(params, "uf", PID, Health)) return SendClientMessage(playerid, -1, "USAGE: /sethp [playerid] [health]");
    if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, -1, "Player is not connected.");
    SetPlayerHealth(PID, Health);
    return 1;
}
:]
Reply


Messages In This Thread
Creating a /sethp command - by DaleWestbrook - 16.06.2014, 07:36
Re: Creating a /sethp command - by Abagail - 16.06.2014, 12:18
Re: Creating a /sethp command - by NewerthRoleplay - 16.06.2014, 13:53
Re: Creating a /sethp command - by SKAzini - 17.06.2014, 13:38
Re: Creating a /sethp command - by AndreiWow - 18.11.2014, 18:06

Forum Jump:


Users browsing this thread: 2 Guest(s)