Yes, you could give them permission. This is an example:
pawn Код:
CMD:makemember(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 5)
{
new targetid, faction, string[128];
if(sscanf(params, "ui", targetid, faction))
{
return SendClientMessageEx(playerid, COLOR_GRAY, "Usage: /makemember <playerid> <1: LSPD, 2: LSFMD>");
}
else if(!IsPlayerConnected(targetid)) return SendClientMessageEx(playerid, COLOR_GRAY, "Invalid player specified.");
else if(faction < 1 || faction > 2) return SendClientMessageEx(playerid, COLOR_GRAY, "Usage: /makemember <playerid> <1: LSPD, 2: LSFMD>");
PlayerInfo[targetid][pFaction] = faction;
PlayerInfo[targetid][pRank] = 1;
PlayerInfo[targetid][pFamily] = 0;
SetPlayerStatInt(targetid, "CHARACTER", "faction", PlayerInfo[targetid][pFaction]);
SetPlayerStatInt(targetid, "CHARACTER", "rank", PlayerInfo[targetid][pRank]);
SetPlayerStatInt(targetid, "CHARACTER", "family", PlayerInfo[targetid][pFamily]);
new File:paylog = fopen("logs/faction.log", io_append);
format(string, sizeof(string), "[%s]: %s has set %s's as the leader of the faction.\n", GetFactionName(PlayerInfo[targetid][pFaction]), GetRPName(playerid), GetRPName(targetid));
fwrite(paylog, string);
fclose(paylog);
format(string, sizeof(string), "You were made a member of the %s by %s", GetFactionName(PlayerInfo[targetid][pFaction]), GetRPName(playerid));
SendClientMessageEx(targetid, COLOR_YELLOW, string);
format(string, sizeof(string), "You have made %s a member of %s!", GetRPName(targetid), GetFactionName(PlayerInfo[targetid][pFaction]));
return SendClientMessageEx(playerid, COLOR_ORANGE, string);
}
return 1;
}
My own personnel /makemember command, although it uses different variables, you could switch the stuff yourself. Uses sscanf and zcmd.
What do you mean it didn't work? Did you change the variables and such?