13.06.2012, 11:29
Hello,long time no see,i've advanced a lot in coding from last time,and now i have another problem.
I cannot find a way to make a command ask for more than the player id...
Example:
/setfaction [playerid][factionid]
i can only make a kill command...like this one...
can you please give me an example of how to ask for the player to type more than just the id?
I cannot find a way to make a command ask for more than the player id...
Example:
/setfaction [playerid][factionid]
i can only make a kill command...like this one...
Код:
dcmd_setfaction(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] < gCommands[SETFACTION])
{
new string[100];
format(string, sizeof(string), "You must be administrator level %d to use that command!", gCommands[SETFACTION]);
return SendClientMessage(playerid, COLOUR_ORANGE, string);
}
else if(!strlen(params))
return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /kill [id | name]");
else
{
new id = (isNumeric(params)) ? strval(params) : GetPlayerId(params);
if(IsPlayerConnected(id) && id != playerid)
{
}
else
return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You can not admin-kill yourself or a disconnected player.");
}
}
//credits to wiki


