C:\Users\4neals\Desktop\Scripting\Test\gamemodes\UGRP.pwn(7440) : warning 213: tag mismatch
C:\Users\4neals\Desktop\Scripting\Test\gamemodes\UGRP.pwn(7440) : warning 202: number of arguments does not match definition
C:\Users\4neals\Desktop\Scripting\Test\gamemodes\UGRP.pwn(21431) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
new jailTimer[MAX_PLAYERS];
new jailed[MAX_PLAYERS];
CMD:jail(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin])
{
new string[128], cibleid, time, reason[128], PlayerName[MAX_PLAYER_NAME], APlayerName[MAX_PLAYER_NAME];
if(sscanf(params,"dds",cibleid,time,reason)) return SendClientMessage(playerid, -1, "USAGE: /jail [playerid] [time] [reason]");
if (!IsPlayerConnected(cibleid)) return SendClientMessage(playerid, -1, "[ERROR]The Player is not connected.");
if(jailed[cibleid] == 1) return SendClientMessage(playerid, -1, "[ERROR]The Player is already jailed.");
GetPlayerName(cibleid, PlayerName, sizeof(PlayerName));
GetPlayerName(playerid, APlayerName, sizeof(APlayerName));
format(string, sizeof(string), "%s has been jailed for %d minutes; Reason: %s", PlayerName, time, reason);
SendClientMessageToAll(-1, string);
SetPlayerHealth(cibleid, 9999999999.0);
ResetPlayerWeapons(cibleid);
}
return 1;
}
CMD:release(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin])
{
new cibleid;
if(sscanf(params,"u",cibleid)) return SendClientMessage(playerid, -1, "USAGE: /unjail [playerid]");
if (!IsPlayerConnected(cibleid)) return SendClientMessage(playerid, -1, "[ERROR]The Player is not connected.");
if(jailed[cibleid] == 0) return SendClientMessage(playerid, -1, "[ERROR]The Player is not jailed.");
{
jailed[cibleid] = 0;
}
SpawnPlayer(cibleid);
SetPlayerHealth(cibleid, 100);
KillTimer(jailTimer[cibleid]);
}
return 1;
}
CMD:jail(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin])
{
new string[128], cibleid, time, reason[128], PlayerName1[MAX_PLAYER_NAME], APlayerName[MAX_PLAYER_NAME];
if(sscanf(params,"dds",cibleid,time,reason)) return SendClientMessage(playerid, -1, "USAGE: /jail [playerid] [time] [reason]");
if (!IsPlayerConnected(cibleid)) return SendClientMessage(playerid, -1, "[ERROR]The Player is not connected.");
if(jailed[cibleid] == 1) return SendClientMessage(playerid, -1, "[ERROR]The Player is already jailed.");
GetPlayerName(cibleid, PlayerName1, sizeof(PlayerName1));
GetPlayerName(playerid, APlayerName, sizeof(APlayerName));
format(string, sizeof(string), "%s has been jailed for %d minutes; Reason: %s", PlayerName1, time, reason);
SendClientMessageToAll(-1, string);
SetPlayerHealth(cibleid, 9999999999.0);
ResetPlayerWeapons(cibleid);
}
return 1;
}
C:\Users\4neals\Desktop\Scripting\Test\gamemodes\UGRP.pwn(7440) : warning 213: tag mismatch C:\Users\4neals\Desktop\Scripting\Test\gamemodes\UGRP.pwn(7440) : warning 202: number of arguments does not match definition C:\Users\4neals\Desktop\Scripting\Test\gamemodes\UGRP.pwn(21431) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
Hello!
PHP код:
|
new jailTimer[MAX_PLAYERS];
new jailed[MAX_PLAYERS];
new jailTimer[MAX_PLAYERS];
new jailed[MAX_PLAYERS];