04.08.2011, 19:49
Hi! I made a jail command in strcmp, but I am using ZCMD, so strcmp got disabled! Do u have one for me, pls?
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(94) : error 017: undefined symbol "x" D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(95) : error 017: undefined symbol "JailTimer" D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(95) : warning 215: expression has no effect D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(95) : error 001: expected token: ";", but found "]" D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(95) : error 029: invalid expression, assumed zero D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(95) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
CMD:jail(playerid, params[])
{
new id, mins, str[128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xffffffff, "You're not Admin!");
if(sscanf(params, "ud", id, mins)) return SendClientMessage(playerid, 0xffffffff, "[Usage]: /jail <id> <minutes>");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xffffffff, "Invalid player id.");
SetPlayerPos(id, x, y, z); //ERROR, NEED JAILPOS
JailTimer[id] = SetTimerEx("Unjail", mins*60*1000, 0, "d", id); //ERROR
format(str, sizeof(str), "You jailed %s for %d mins.", GetName(id), mins);
SendClientMessage(playerid, 0xffffffff, str);
format(str, sizeof(str), "%s jailed you for %d mins.", GetName(playerid), mins);
SendClientMessage(id, 0xffffffff, str);
return 1;
}
new tmp[256];
tmp = strtok(params,Index);
id = strval(tmp);
new tmp2[256]; tmp2 = strtok(params,Index);
new mins = strval(tmp2);