05.04.2013, 05:42
Hello, I wanted a code that every 5 minutes the player loses one wantedlevel.
SetTimerEx("wantedtimer", 1000*60*5, true, "i", playerid);
..
forward wantedtimer(playerid);
public wantedtimer(playerid)
{
if(GetPlayerWantedLevel) >= 1)
{
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) - 1);
}
}
forward wantedtimer(playerid); SetTimerEx("wantedtimer", 1000*60*5, true, "i", playerid); public wantedtimer(playerid) { if(GetPlayerWantedLevel) >= 1) { SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) - 1); } } |
C:\Users\Daniel\Desktop\Servidor de Gta\gamemodes\BHL.pwn(50645) : error 021: symbol already defined: "SetTimerEx" C:\Users\Daniel\Desktop\Servidor de Gta\gamemodes\BHL.pwn(50649) : error 076: syntax error in the expression, or invalid function call C:\Users\Daniel\Desktop\Servidor de Gta\gamemodes\BHL.pwn(50649) : error 029: invalid expression, assumed zero C:\Users\Daniel\Desktop\Servidor de Gta\gamemodes\BHL.pwn(50649) : warning 215: expression has no effect C:\Users\Daniel\Desktop\Servidor de Gta\gamemodes\BHL.pwn(50649) : error 001: expected token: ";", but found ")" C:\Users\Daniel\Desktop\Servidor de Gta\gamemodes\BHL.pwn(50649) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. |
public LWantedLevel ( ) { for ( new playerid = 0; playerid < MAX_PLAYERS; playerid ++ ) { if ( IsPlayerConnected ( playerid ) ) { if ( GetPlayerWantedLevel ( playerid ) > 1 && GetPlayerWantedLevel ( playerid ) < 6 ) { SetPlayerWantedLevel ( playerid , GetPlayerWantedLevel ( playerid ) - 1 ); { SetTimerEx("LWantedLevel", 10*6*5, true, "i", playerid); } } } } } |