Help with ZCMD + sscanf
#8

pawn Код:
command(sethp, playerid, params[])
{
    new player2, Float:health,string[128],string2[128];
    if(sscanf(params, "uf", player2, health)) return SendClientMessage(playerid, COLOR_WHITE, "[USAGE]:/sethp <playerid> <health>");
    if(!IsPlayerConnected(player2)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player.");
    SetPlayerHealth(player2, health);
    format(string2,sizeof(string2),"Player's health set to: %d.",health);
    SendClientMessage(playerid, COLOR_WHITE, string2);
    format(string,sizeof(string),"Your health has been set to: %d.",health);
    SendClientMessage(player2, COLOR_WHITE,string);
    return 1;
}
A more detailed command.
Reply


Messages In This Thread
Help with ZCMD + sscanf - by [NRP]Blade - 29.03.2011, 20:15
Re: Help with ZCMD + sscanf - by Jefff - 29.03.2011, 20:24
Re: Help with ZCMD + sscanf - by [NRP]Blade - 29.03.2011, 20:40
Re: Help with ZCMD + sscanf - by Jefff - 29.03.2011, 21:44
Re: Help with ZCMD + sscanf - by Skylar Paul - 29.03.2011, 22:36
Re: Help with ZCMD + sscanf - by [NRP]Blade - 29.03.2011, 22:36
Re: Help with ZCMD + sscanf - by Skylar Paul - 29.03.2011, 22:39
Re: Help with ZCMD + sscanf - by SchurmanCQC - 29.03.2011, 22:41
Re: Help with ZCMD + sscanf - by Skylar Paul - 29.03.2011, 22:43
Re: Help with ZCMD + sscanf - by [NRP]Blade - 29.03.2011, 22:44

Forum Jump:


Users browsing this thread: 1 Guest(s)