Faction save - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Faction save (
/showthread.php?tid=535673)
Faction save -
DarkScimitar - 05.09.2014
Please help this is code
CMD:makeleader(playerid, params[])
{
if(!CheckAdmin(playerid, HIGH_ADMIN_LEVEL)) return NotAuthMSG(playerid);
new id, faction;
if(sscanf(params,"ud",id,faction)) return SyntaxMSG(playerid, "/makeleader [playerid] [factionid(/factions)]");
if(!PlayerIsOn(id)) return NotConnectedMSG(playerid);
format(msg, sizeof(msg), "AdmCmd: %s has just given %s leader rank in faction %s.", GetName(playerid), GetName(id), GetShortFactionName(faction));
AMSG(COLOR_LIGHTRED, msg);
format(msg, sizeof(msg), "Admin %s has just given you leader rank in faction %s.", GetName(playerid), GetShortFactionName(faction));
SCM(id, COLOR_LIGHTRED, msg);
PlayerInfo[id][pRank] = Factions[faction][fLeaderRank];
PlayerInfo[id][pFaction] = faction;
PlayerInfo[id][pBadgeNumber] = randomEx(23465, 99999);
return 1;
}
Re: Faction save -
adithegman - 05.09.2014
Errors?