if(sscanf(params, "us[144]", PID))
if(!strcmp(params, "none"))
new PID, something[144];
if(sscanf(params, "us[144]", PID, something))
if(!strcmp(something, "none"))
if(sscanf(params, "u", PID))
PHP код:
PHP код:
|
CMD:issuelicense(playerid, params[]) { new PID; new string[128]; new param[144]; new Float:X; new Float:Y; new Float:Z; GetPlayerPos(PID, X, Y, Z); if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z)) if(sscanf(params, "us[144]", PID, param)) { SendClientMessage(playerid, COLOR_GREY, "[Usage:] /issuelicense [playerid/partofname] [param]"); SendClientMessage(playerid, COLOR_GREY, "PARAMS: PF, BLS"); SendClientMessage(playerid, COLOR_GREY, "TIP: If you want to revoke a license, use /revokelicense."); } if(!strcmp(param, "PF")) { PlayerInfo[playerid][pPF] = 1; format(string, sizeof(string), "You have given %s a PF license.", RPN(playerid)); SendClientMessage(playerid, -1, string); format(string, sizeof(string), "%s has given you a PF license.", RPN(playerid)); SendClientMessage(PID, -1, string); } if(!strcmp(param, "BLS")) { PlayerInfo[playerid][pBLS] = 1; format(string, sizeof(string), "You have given %s a BLS license.", RPN(playerid)); SendClientMessage(playerid, -1, string); format(string, sizeof(string), "%s has given you a BLS license.", RPN(playerid)); SendClientMessage(PID, -1, string); } return 1; } CMD:revokelicense(playerid, params[]) { new PID; new string[128]; new param[144]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(sscanf(params, "us[144]", PID, param)) { SendClientMessage(playerid, COLOR_GREY, "[Usage:] /revokelicense [playerid/partofname] [param]"); SendClientMessage(playerid, COLOR_GREY, "PARAMS: PF, BLS"); SendClientMessage(playerid, COLOR_GREY, "TIP: If you want to give a license, use /issuelicense."); } if(!strcmp(param, "PF")) { PlayerInfo[playerid][pPF] = 0; format(string, sizeof(string), "You have revoked %s's PF license.", RPN(playerid)); SendClientMessage(playerid, -1, string); format(string, sizeof(string), "%s has revoked your PF license.", RPN(playerid)); SendClientMessage(PID, -1, string); } if(!strcmp(param, "BLS")) { PlayerInfo[playerid][pBLS] = 0; format(string, sizeof(string), "You have revoked %s's BLS license.", RPN(playerid)); SendClientMessage(playerid, -1, string); format(string, sizeof(string), "%s has revoked your BLS license.", RPN(playerid)); SendClientMessage(PID, -1, string); } return 1; }
Originally Posted by WikiLimits
Text Input (Chat/Commands) 128 cells (512 bytes)
|
Why make something 144, when it can't take that much in the first instance?
And DON'T just set it to 128... |
I'm not here to get useless posts like this here, I'm here to improve my scripting ability. Acknowledge the fact that I stated I was a "decent" scripter. Doesn't mean I'm ****** or Zeex quality, or even indeed, your quality.
|