18.12.2012, 19:46
Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod.pwn(1362) : warning 219: local variable "PlayerName" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
command:
Код:
CMD:jail(playerid,params[]) { if (PlayerInfo[playerid][pAdmin] >= 2) { new id,time,reason[100],PlayerName[MAX_PLAYER_NAME],GPlayerName[MAX_PLAYER_NAME], string[128]; if(sscanf(params,"dds",id,time,reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /jail <playerid> <time> <reason>"); if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected."); if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin])return SendClientMessage(playerid,COLOR_RED,"ERROR: He is a greater level than your level."); if(Jailed[id] == 1)return SendClientMessage(playerid,COLOR_RED,"ERROR: Player is already jailed."); GetPlayerName(id, PlayerName, sizeof(PlayerName)); GetPlayerName(playerid, GPlayerName, sizeof(GPlayerName)); format(string, sizeof(string), "-X Admin-: %s (ID:%d) has been jailed for %d minutes; Reason: %s", PlayerName, id, time, reason); SendClientMessage(playerid, COLOR_RED, string); format(string, sizeof(string), "Admin %s, Command Used 'JAIL' Taregt: %s (ID:%d)", GPlayerName, PlayerName, id); SendClientMessage(playerid, COLOR_RED, string); Jailed[id] = 1; SetPlayerInterior(id, 3); SetPlayerVirtualWorld(id, 10); SetPlayerFacingAngle(id, 360.0); SetPlayerPos(id, 197.5662, 175.4800, 1004.0); SetPlayerHealth(id, 9999999999.0); ResetPlayerWeapons(id); JailTimer[id] = SetTimerEx("Unjail",time*60000, false, "i", id); } else { return 0; } return 1; }