30.07.2012, 03:10
Fixed it all, thanks!
Also:
My /giverank command for LSPD is buggy, I need it so R5 and above can use the command, i've tried alot of things but im really confused with this one.. 5 - 6 Are the ranks I want to be able to use it, NOBODY lower, could anyone do this pleaase?
Also:
Quote:
CMD:giverank(playerid, params[]) { new pID, value; if(PlayerInfo[playerid][pLSPD] >= 5) else return SendClientMessage(playerid, COLOR_WHITE, "You are not a member of the LSPD."); else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giverank [playerid/partofname] [rank 1-5]"); else if (value < 1 || value > 5) return SendClientMessage(playerid, COLOR_WHITE, "Unknown rank! [1 - 5]"); else if(pID == INVALID_PLAYER_ID) return SCM(playerid, COLOR_WHITE,"Invalid player ID."); else { new pName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); GetPlayerName(pID, tName, MAX_PLAYER_NAME); format(string, sizeof(string), "You have promoted %s to rank %i!", tName, value); SCM(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "You have been promoted to rank %i!", value, pName); SCM(pID, COLOR_LIGHTBLUE, string); PlayerInfo[pID][pLSPD] = value; return 1; } } |