31.03.2014, 10:41
At this CMD. When i tried to /makegangmod and when that player is already gang mod. It return 1;
But, It doesnt. Even if player is not gang mod its showing "That player is already a gang mod" return 1;
But he/she not gang mod.
I found out the bugged and its on
. It didnt givetoid. It referring to myself like [playerid] . So when im gang mod and i made player gang it will return 1; and showns the message.
So, i want it if player is already a gang mod it will return 1; or return SendClientMessage
Same in removegangmod
THANK YOU VERY MUCH FOR HELPING!
But, It doesnt. Even if player is not gang mod its showing "That player is already a gang mod" return 1;
But he/she not gang mod.
I found out the bugged and its on
Код:
givetoid
So, i want it if player is already a gang mod it will return 1; or return SendClientMessage
Код:
CMD:makegangmod(playerid, params[]) { if(CheckGMX(playerid)) return 1; new givetoid, name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], astring[256]; if(PlayerInfo[playerid][pAdmin] < 5 ) return SendClientMessage(playerid, COLOR_WHITE, "Your admin level is not high enough."); if(PlayerInfo[givetoid][pGangMod] == 1 ) return SendClientMessage(playerid, COLOR_REALRED, "ERROR: That player is already an gang moderator!"); if(sscanf(params, "i", givetoid)) { return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /makegangmod [playerid]"); } GetPlayerName(givetoid, name, MAX_PLAYER_NAME); GetPlayerName(playerid, name2, MAX_PLAYER_NAME); format(astring, sizeof(astring), "You made %s a gangmod", name); if(!IsPlayerNPC(playerid) && IsPlayerConnected(playerid)) { PlayerInfo[givetoid][pGangMod] = 1; SendClientMessage(playerid, COLOR_LIGHTBLUE, astring); format(astring, sizeof(astring), "You have been made Gang Moderator by an Admin", name); SendClientMessage(givetoid, COLOR_LIGHTBLUE, astring); format(astring, sizeof(astring), "ADMCMD: Admin %s has made %s as Gang Moderator", name, name2); ABroadCast(COLOR_LIGHTRED, astring, 1); } return 1; }
Код:
CMD:removegangmod(playerid, params[]) { if(CheckGMX(playerid)) return 1; new givetoid, name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], astring[256]; if(PlayerInfo[playerid][pAdmin] < 5 ) return SendClientMessage(playerid, COLOR_WHITE, "Your admin level is not high enough."); if(PlayerInfo[givetoid][pGangMod] == 0 ) return SendClientMessage(playerid, COLOR_REALRED, "ERROR: That player is not an gang Moderator"); if(sscanf(params, "i", givetoid)) { return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /removegangmod [playerid]"); } GetPlayerName(givetoid, name, MAX_PLAYER_NAME); GetPlayerName(playerid, name2, MAX_PLAYER_NAME); format(astring, sizeof(astring), "You remove %s a gangmod", name); if(!IsPlayerNPC(playerid) && IsPlayerConnected(playerid)) { PlayerInfo[givetoid][pGangMod] = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, astring); format(astring, sizeof(astring), "You have been Remove from Gang Moderator", name); SendClientMessage(givetoid, COLOR_LIGHTBLUE, astring); format(astring, sizeof(astring), "ADMCMD: Admin %s has remove %s as Gang Moderator", name, name2); ABroadCast(COLOR_LIGHTRED, astring, 1); } return 1; }