26.06.2018, 21:10
Ever since I added weapon-config include, these two commands have been bugged, not quite sure why. All of these commands worked before. Now, whenever I type them in, I get this:
However, when I enter the command without putting parameters, or I try to use the command without being the proper admin level, I get the error messages I put in:
Code for the 2 commands:
However, when I enter the command without putting parameters, or I try to use the command without being the proper admin level, I get the error messages I put in:
Код:
CMD<AD1>:forceteam(cmdid, playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /forceteam [player]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, NOPLAYER); if(LoggedIn[targetid] != true) return SendClientMessage(playerid, COLOR_RED, NOTLOGGEDIN); if(UserStats[playerid][AdminLevel] < UserStats[targetid][AdminLevel]) return SendClientMessage(playerid, COLOR_RED, NOLEVEL); ForceClassSelection(targetid); SetPlayerHealth(targetid, 0.0); PlayerPlaySound(targetid, 1057, 0.0, 0.0, 0.0); PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0); new buf[150]; format(buf, sizeof(buf), "[AdmCmd]: Admin [%i] %s has forced you to class selection.", playerid, GetName(playerid)); SendClientMessage(targetid, COLOR_RED, buf); format(buf, sizeof(buf), "You have forced [%i] %s to class selection.", GetName(targetid), targetid); SendClientMessage(playerid, COLOR_RED, buf); return 1; }
Код:
CMD<AD1>:suicide(cmdid, playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /suicide [player id]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, NOPLAYER); if(!LoggedIn[targetid]) return SendClientMessage(playerid, COLOR_RED, NOTLOGGEDIN); if(UserStats[playerid][AdminLevel] < UserStats[targetid][AdminLevel]) return SendClientMessage(playerid, COLOR_RED, NOLEVEL); SetPlayerHealth(targetid, -1); return 1; }