09.12.2012, 09:57
Here is my command so far:
What im trying to do here is if the (sLeader) executes the command /finvite, it will set the (toplayerid) the rank of 1-4 whichever he entered..
My variables from the faction are
Only thing is how do i set so the rank parameters can only be used as 0-4 or would i just need to make 5 different commands?
pawn Код:
COMMAND:finvite(playerid, params[])
{
if (sLeader(playerid))
{
new
toplayerid, // the player we want to make SA-PD
rank; // extracting player's ID and rank from params
if (!sscanf(params, "ii", toplayerid, rank))
{
if (toplayerid != INVALID_PLAYER_ID)
{
new
message[40];
format(message, sizeof(message), "You were set rank %i By the SA-PD Leader.!", rank);
SendClientMessage(toplayerid, 0x00FF00FF, message);
}
else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
}
else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /finvite <playerid> <rank>");
}
else SendClientMessage(playerid, 0xFF0000FF, "Only the SA-PD Leader can use this command!");
return 1;
}
My variables from the faction are
pawn Код:
// SA-PD
new sRank0,
sRank1,
sRank2,
sRank3,
sLeader;
// SA-PD