24.06.2011, 18:25
is this r ight? i was looking around:
pawn Код:
dcmd_makeleader(playerid, params[])
{
new
giveplayerid,
factionid,
string[128];
if (sscanf(params, "ud", giveplayerid, factionid)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /makeleader [playerid/partname] [factionid]");
else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else
{
if(factionid <= 14)
{
PlayerInfo[giveplayerid][pMemberF] = factionid;
format(string, sizeof(string), "An admin has set your faction to factionid %d.", PlayerInfo[playerid][pMemberF]);
SendClientMessage(playerid, COLOR_GREEN, string);
}
else if(factionid >= 14)
{
SendClientMessage(playerid, COLOR_GREEN, "The Factionid needs to be between 14 and 0 !");
}
}
return 1;
}