TimerEx... not working? what's the problem? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: TimerEx... not working? what's the problem? (
/showthread.php?tid=379633)
TimerEx... not working? what's the problem? -
Daledos - 22.09.2012
Hi all....
I only put code snippets, I do not by any error and no warning.
Sorry for my bad english...
Код:
forward timecheck(playerid);
new job[MAX_PLAYERS];
public ResetStats(playerid)
{
job[playerid] = 0;
}
Код:
if(strcmp(cmd, "/startjob", true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(idcar>=91 && idcar<=96)
{
SendClientMessage(playerid,COLOR_WHITE,"MESSAGE 1");
SetPlayerCheckpoint(playerid, -2390.8999, -33.5, 25.0, 4.00);
if(IsPlayerInCheckpoint(playerid))
{
SetTimerEx("timecheck", 5000, false, "d", playerid);
}
return 1;
}
}
SendClientMessage(playerid,COLOR_WHITE,"You need to be a vehicle.");
return 1;
}
}
Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(job[playerid] == 1)
{
SetPlayerCheckpoint(playerid, -2399.1999, 80.0999, 25.0, 4.00);
if (IsPlayerInCheckpoint(playerid))
{
SetTimerEx("timecheck", 5000, false, "d", playerid);
}
}
else if(job[playerid] == 2)
{
SetPlayerCheckpoint(playerid, -2338.8000, 23.5, 25.0, 4.00);
if (IsPlayerInCheckpoint(playerid))
{
SetTimerEx("timecheck", 5000, false, "d", playerid);
}
}
else if(job[playerid] == 3)
{
SetPlayerCheckpoint(playerid, -2299.1000, 6.1999, 25.0, 4.00);
if (IsPlayerInCheckpoint(playerid))
{
SetTimerEx("timecheck", 5000, false, "d", playerid);
}
}
else if(job[playerid] == 4)
{
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
RemovePlayerFromVehicle(playerid);
GivePlayerMoney(playerid, 1300);
SendClientMessage(playerid,COLOR_WHITE,"Finish your job!");
job[playerid] = 0;
}
}
Код:
public timecheck(playerid)
{
job[playerid]++;
}
thank you!!
Re: TimerEx... not working? what's the problem? -
Daledos - 22.09.2012
Please... delete my question!