Could someone take a look at this for me?
#1

Hey all, myself and a friend modified Jakku's dynamic organization script (Great work by the way, i take no credit for creating the base script). We added a fire call system to it which is working out fine, but i'm having problems with the rank system. For example: my game name is Cody_Reiger. When i do "/setrank cody_reiger Chief" instead of changing my name to [Chief] Cody_Reiger, it changes my name to [Chief]. Any idea what we screwed up? Link to the pastebin:
http://pastebin.com/VmvsXe0w
Reply
#2

Would be better if you post the command only instead the entire script
Reply
#3

there is nothing in the script that has to do with [Chief], please show the code of it and we can help..
Reply
#4

I know theres no [Chief] in the code, Its the setrank command. When i use it instead of adding the rank before your name it changes your whole name to [Chief], [Firefighter], [None], etc. I dont think its the actual /setrank command doing it, i think its something amongst the rest of the code hence why i posted the whole code.
Reply
#5

pawn Код:
CMD:setrank(playerid, params[])
{
if (!IsLeader(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not the leader of an organization");
new ID, rank[28];
if (sscanf(params, "us[28]", ID, rank)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /setrank [playerid] [rank]");
if (strlen(rank) > 28) return SendClientMessage(playerid, COLOR_RED,"The maximum rank length is 28 characters!");
if (!IsPlayerConnected(ID)) return 1;
new org = PlayerOrg[playerid];
if (PlayerOrg[ID] != org) return SendClientMessage(playerid, COLOR_RED,"That player does not belong to your organization");
new string[120];
format(string,sizeof(string),"Your leader %s has given you a rank: '%s'", PlayerName(playerid), rank);
SendClientMessage(ID, COLOR_YELLOW, string);
format(string,sizeof(string),"You have given a rank to %s (%s)", PlayerName(ID), rank);
SendClientMessage(playerid, COLOR_YELLOW, string);
PlayerRank[ID] = rank;
format(string,sizeof(string),"[%s]%s",rank,PlayerName(ID));
SetPlayerName(ID,string);
SavePlayerOrgInfo(ID);
return 1;
}
Try this one, it think this one will do fine.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)