07.08.2011, 14:01
Hello, I found this cmd to use but it has errors i cant fix this can you help me,, & & i need to put reason for jail.
ERRORS:
Command:
ERRORS:
pawn Код:
D:\Games\ELRPv1\gamemodes\ELRP.pwn(877) : error 017: undefined symbol "DenyMessage"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(882) : error 017: undefined symbol "money"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : error 017: undefined symbol "giveplayer"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : error 017: undefined symbol "giveplayer"
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : error 029: invalid expression, assumed zero
D:\Games\ELRPv1\gamemodes\ELRP.pwn(884) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
pawn Код:
CMD:jail(playerid, params[])
{
new giveplayerid, time;
if(sscanf(params, "ud", giveplayerid, time))SendClientMessage(playerid, COLOR_WHITE, "USAGE: /jail [playerid] [time]");
if(PlayerInfo[playerid][pAdmin] < 2)return DenyMessage(playerid, 2);
if(!IsPlayerConnected(giveplayerid))return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player ID.");
if(PlayerInfo[playerid][pAdmin] < PlayerInfo[giveplayerid][pAdmin])return SendClientMessage(playerid, COLOR_BRIGHTRED, "You can't jail a higher level Admin !");
else
{
PlayerInfo[giveplayerid][pPrisonTime] = money; // <<<=== do i need to put here pCash?
PlayerInfo[giveplayerid][pPrison] = 1;
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
ResetPlayerWeapons(giveplayerid);
GameTextForPlayer(giveplayerid, "~r~Busted", 3000, 3);
SetPlayerInterior(giveplayerid, 3);
SetPlayerPos(giveplayerid, 198.5319,162.3093,1003.0300);
format(string, sizeof(string), "\"%s\" has been jailed by Admin \"%s\" for %d seconds.", giveplayer, sendername, money);
SendClientMessageToAll(COLOR_YELLOW, string);
SetTimerEx("UnJail",PlayerInfo[giveplayerid][pPrisonTime]*1000,0,"d",giveplayerid);
}
return true;
}