17.12.2013, 18:25
pawn Код:
CMD:faction(playerid, params[])
{
new string[128], pID, rank, option[35], msgbox[128];
if(PlayerInfo[playerid][Faction] == 0) return SendClientMessage(playerid, COLOR_ADMIN_GM, "You aren't in any faction!");
if(sscanf(params, "s[128]", option)) return SendClientMessage(playerid, COLOR_ADMIN_GM, "USAGE: /faction [params]");
if(!strcmp(option, "invite"))
{
if(sscanf(params, "{s[10]}r", pID)) return SendClientMessage(playerid, COLOR_ADMIN_GM, "USAGE: /faction invite [playerid]");
else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMIN_GM, "Error: 65535 Invalid playerid!");
else
{
printf("Debug, 'invite' pID: %s", pID);
}
}
else if(!strcmp(option, "uninvite"))
{
if(sscanf(params, "{s[10]}r", pID)) return SendClientMessage(playerid, COLOR_ADMIN_GM, "USAGE: /faction uninvite [playerid]");
else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_ADMIN_GM, "Error: 65535 Invalid playerid!");
else
{
print("Uninvite");
printf("DEBUG 'uninvite' ID: %d", pID);
}
}
return 1;
}