02.09.2012, 21:40
pawn Код:
CMD:jail(playerid, params[])
{
if (Cop[playerid]==0)
{
new targetid, minutes;
if(sscanf(params, "ri", targetid, minutes)) return SendClientMessage(playerid, COLOR_ORANGE,"Usage: /jail <playerid> <minutes>");
if(minutes <= 0 || minutes > 60) return SendClientMessage(playerid, COLOR_CRIMSON, "Minutes can't be less than 0 or more than 60.");
if(targetid == playerid) return SendClientMessage(playerid, COLOR_CRIMSON, "You can't jail yourself!");
else
{
new str[128]; //create a new string
LINE 1976 = format(str, sizeof(str), "[Sentence] %s has been jailed by %s for %d minutes.", Name(targetid), Name(playerid), minutes);
SendClientMessageToAll(COLOR_GREY,str);
JailTimer[targetid] = SetTimer("Unjail", minutes*60*1000, false);
SetPlayerPos(targetid, 264.4176, 77.8930, 1001.0391);
SetPlayerInterior(playerid, 6);
inJail[targetid] = 1;
GameTextForPlayer(playerid, "~p~JAILED", 10000, 6);
PlayerPlaySound(targetid,1057,0.0,0.0,0.0);
}
}
else return SendClientMessage(playerid, COLOR_CRIMSON, "You are not a member of the SP/SD.");
return 1;
}
Quote:
C:\Users\Luca\Desktop\BaseScript\gamemodes\base.pw n(1976) : error 012: invalid function call, not a valid address C:\Users\Luca\Desktop\BaseScript\gamemodes\base.pw n(1976) : warning 215: expression has no effect C:\Users\Luca\Desktop\BaseScript\gamemodes\base.pw n(1976) : error 001: expected token: ";", but found ")" C:\Users\Luca\Desktop\BaseScript\gamemodes\base.pw n(1976) : error 029: invalid expression, assumed zero C:\Users\Luca\Desktop\BaseScript\gamemodes\base.pw n(1976) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |