if(IsWorking[playerid] == 1 && VJob[playerid] != -1 ) KillTimer(TimerStopJob);
error 076: syntax error in the expression, or invalid function call
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(PlayerData[playerid][SpectateP] != -1) PlayerSpectateVehicle(PlayerData[playerid][SpectateP], vehicleid);
if(StaticVeh[vehicleid][vSpecial] == 15) SendClientMessage(playerid, RED, "WARNING: This faggio will respawn in 10 seconds if you leave it.");
if(IsWorking[playerid] == 1 && VJob[playerid] != -1 ) KillTimer(TimerStopJob);
if(PlayerData[playerid][CarLic] == 0 && StaticVeh[vehicleid][vSpecial] == 0)
if(ispassenger ==0)
{
if(!(IsAPlane(vehicleid) || IsABoat(vehicleid) || IsABike(vehicleid)))
{
if(PlayerData[playerid][CarLic] == 0 && StaticVeh[vehicleid][vSpecial] == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+3);
SendClientMessage(playerid, COLOR_WHITE, "You don't have a driving license");
}
if(PlayerData[playerid][CarLic] == 0 && StaticVeh[vehicleid][vSpecial] == 15)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+3);
SendClientMessage(playerid, COLOR_WHITE, "You don't have a driving license");
}
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(PlayerData[playerid][SpectateP] != -1) PlayerSpectateVehicle(PlayerData[playerid][SpectateP], vehicleid);
if(StaticVeh[vehicleid][vSpecial] == 15) SendClientMessage(playerid, RED, "WARNING: This faggio will respawn in 10 seconds if you leave it.");
if(IsWorking[playerid] == 1 && VJob[playerid] != -1 ) KillTimer(TimerStopJob);
if(PlayerData[playerid][CarLic] == 0 && StaticVeh[vehicleid][vSpecial] == 0)
{
if(ispassenger ==0)
{
if(!IsAPlane(vehicleid) && !IsABoat(vehicleid) && !IsABike(vehicleid))
{
if(PlayerData[playerid][CarLic] == 0 && StaticVeh[vehicleid][vSpecial] == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+3);
SendClientMessage(playerid, COLOR_WHITE, "You don't have a driving license");
}
if(PlayerData[playerid][CarLic] == 0 && StaticVeh[vehicleid][vSpecial] == 15)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+3);
SendClientMessage(playerid, COLOR_WHITE, "You don't have a driving license");
}
}
}
}
}
if(IsWorking[playerid] == 1 && VJob[playerid] != -1 ) KillTimer(TimerStopJob);
function TimerStopJob(playerid)
{
if(VJob[playerid] != -1) { DestroyVehicle(VJob[playerid]); VJob[playerid] = 0; }
if(TrailerID[playerid] != -1) { DestroyVehicle(TrailerID[playerid]); TrailerID[playerid] = 0; }
DisablePlayerCheckpoint(playerid);
RemoveDestination(playerid);
PTruckerCP[playerid] = -1;
VJob[playerid] = -1;
TrailerID[playerid] = -1;
IsWorking[playerid] =0;
SendClientMessage(playerid, COLOR_WHITE, "You canceled your job");
return 1;
}
SetTimerEx("TimerStopJob", 30000, 0, "i", playerid);
you have to create a separate variable for this timer.
for example TimerStopJobTimer[MAX_PLAYERS]; than you have to start a timer like this. TimerStopJobTimer[playerid] = SetTimerEx("TimerStopJob", 30000, 0, "i", playerid); and kill must be this KillTimer(TimerStopJobTimer[playerid]); |