CMD:postavilidera(playerid, params[]) { static userid, id; if (PlayerData[playerid][pAdmin] < 5) return SendErrorMessage(playerid, "Niste ovlasteni."); if (sscanf(params, "ud", userid, id)) return SendSyntaxMessage(playerid, "/postavilidera [playerid/ime] [organizacija id] (Koristi -1 da skines lidera)"); if (userid == INVALID_PLAYER_ID) return SendErrorMessage(playerid, "Netacan ID igraca."); if ((id < -1 || id >= MAX_FACTIONS) || (id != -1 && !FactionData[id][factionExists])) return SendErrorMessage(playerid, "Unijeli ste netacan ID organizacije."); if (id == -1) { ResetFaction(userid); SendServerMessage(playerid, "Skinuli ste lidera igracu %s.", ReturnName(userid, 0)); SendServerMessage(userid, "Administrator %s vam je skinuo lidera.", ReturnName(playerid, 0)); } else { SetFaction(userid, id); PlayerData[userid][pFactionRank] = FactionData[id][factionRanks]; SendServerMessage(playerid, "Postavili ste igracu %s lidera organizacije \"%s\".", ReturnName(userid, 0), FactionData[id][factionName]); SendServerMessage(userid, "Administrator %s vas je postavio za lidera organizacije \"%s\".", ReturnName(playerid, 0), FactionData[id][factionName]); } return 1; }
enum factionData { factionID, factionExists, factionName[32], factionColor, factionType, factionRanks, Float:factionLockerPos[3], factionLockerInt, factionLockerWorld, factionSkins[8], factionWeapons[10], factionAmmo[10], Text3D:factionText3D, factionPickup, Float:SpawnX, Float:SpawnY, Float:SpawnZ, SpawnInterior, SpawnVW };
YCMD:admins(playerid, params[]) { if(gPlayerLoggedIn[playerid] == 0) return 1; SendClientMessage(playerid, COLOR_WHITE, "Administrators online:"); foreach(Player, i) { new level[128], string[128]; if(PlayerInfo[playerid][Admin] == 0 && PlayerInfo[i][Admin] > 1 /*&& AdminDuty[i] == 1*/) { switch(PlayerInfo[i][Admin]) { case 2: level = "Junior Admin"; case 3: level = "General Administrator"; case 4: level = "Head Administrator"; case 5: level = "Community Owner"; } format(string, sizeof(string), "%s %s", level, PlayerName(i)); SendClientMessage(playerid, COLOR_GREY, string); } if(PlayerInfo[playerid][Admin] > 0) { switch(PlayerInfo[i][Admin]) { case 1: level = "Secret Admin (1)"; case 2: level = "Junior Admin (2)"; case 3: level = "General Administrator (3)"; case 4: level = "Head Administrator (4)"; case 5: level = "Community Owner (5)"; } format(string, sizeof(string), "%s %s", level, PlayerName(i)); SendClientMessage(playerid, COLOR_GREY, string); } } return 1; }
Lol,if u cant script,dont play samp n dont make server
as he said ,go do that enum factionleader Leader, |