12.12.2015, 15:10
What code u want?
EDIT:
This is /makeleader command:
This is faction data:
EDIT:
This is /makeleader command:
Код:
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 };