19.04.2013, 10:19
I need help!
I want to have like a Power system and Rank system for factions. (depending on your power you will have acces to commands)
I want leaders to be able to do: /Adjustrank (player's ID) (Text for rank)
Then it will save in the user's his .INI, and can be used for like /factionchat and /radio and stuff like that.
I am wondering how i can do this? I've been trying for ages and i cant figure it out how to?
Please help! Once i know how to make that i am also able to make a power system myself, i just need to know this.
Currently my /adjustrank cmd =
I've been trying this:
I want to have like a Power system and Rank system for factions. (depending on your power you will have acces to commands)
I want leaders to be able to do: /Adjustrank (player's ID) (Text for rank)
Then it will save in the user's his .INI, and can be used for like /factionchat and /radio and stuff like that.
I am wondering how i can do this? I've been trying for ages and i cant figure it out how to?
Please help! Once i know how to make that i am also able to make a power system myself, i just need to know this.
Currently my /adjustrank cmd =
Код:
CMD:adjustrankname(playerid, params[]) { new rank, name[32], string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader."); if(sscanf(params, "is[32]", rank, name)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /adjustrankname [rank] [name]"); switch(rank) { case 0: { format(FacInfo[PlayerInfo[playerid][pFac]][fRank0], 32, "%s", name); format(string, sizeof(string), "You have set rank 0's name to %s", name); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } case 1: { format(FacInfo[PlayerInfo[playerid][pFac]][fRank1], 32, "%s", name); format(string, sizeof(string), "You have set rank 1's name to %s", name); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } case 2: { format(FacInfo[PlayerInfo[playerid][pFac]][fRank2], 32, "%s", name); format(string, sizeof(string), "You have set rank 2's name to %s", name); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } case 3: { format(FacInfo[PlayerInfo[playerid][pFac]][fRank3], 32, "%s", name); format(string, sizeof(string), "You have set rank 3's name to %s", name); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } case 4: { format(FacInfo[PlayerInfo[playerid][pFac]][fRank4], 32, "%s", name); format(string, sizeof(string), "You have set rank 4's name to %s", name); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } case 5: { format(FacInfo[PlayerInfo[playerid][pFac]][fRank5], 32, "%s", name); format(string, sizeof(string), "You have set rank 5's name to %s", name); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } case 6: { format(FacInfo[PlayerInfo[playerid][pFac]][fRank6], 32, "%s", name); format(string, sizeof(string), "You have set rank 6's name to %s", name); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } return 1; }
Код:
CMD:adjustrankname(playerid, params[]) { new rank, name[32], string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader."); if(sscanf(params, "is[32]", rank, name)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /adjustrankname [rank] [name]"); switch(rank) { format(PlayerInfo[Playerid[pFac]][pFacRank], 32, "%s", name); format(string, sizeof(string), "You have editted the rankname to %s", name); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } return 1; }