24.05.2009, 10:50
Hi, could someone please see if there's anything wrong in my code...
sometimes the timer works and sometimes it doesn't...
As I see it the timer should work fine...
But nothing happends...
Please help me.
~Lorrden
sometimes the timer works and sometimes it doesn't...
pawn Код:
new IllBillRoadTrain;
new IllBillTrailer;
new pIllBillMission1[MAX_PLAYERS];
new pIllBillMission2[MAX_PLAYERS];
new timer01;
forward CheckIBd1Trailer(vehicleid, trailerid, playerid);
dcmd_start(playerid, params[])
{
#pragma unused params
if(IsPlayerInVehicle(playerid, IllBillRoadTrain))
{
if(IsTrailerAttachedToVehicle(IllBillRoadTrain)) return SendClientMessage(playerid, RED,"[ERROR]: The truck already has a Trailer.");
if(MissionInfo[playerid][IBd1] == 1) return SendClientMessage(playerid, RED,"[ERROR]: You've already completed this misison.");
if(pIllBillMission1[playerid] == 1) return SendClientMessage(playerid, RED,"[ERROR]: You've already accepted this job.");
IllBillTrailer = CreateVehicle(435, 890.5118,-26.0734,63.7832,156.4678, -1, -1, 1440000); //Trailer
pIllBillMission1[playerid] = 1; //Ill Bill mission active!
SendClientMessage(playerid, CYAN,"[Ill Bill]: Go get the trailer, Its placed somewhere in the Red County.");
SendClientMessage(playerid, CYAN,"[Ill Bill]: Then You take it to the checkpoint and maybe there'l be a reward for ya!");
SendClientMessage(playerid, CYAN,"[Ill Bill]: If you do not wish to complete the task type '/stop'.");
SetPlayerCheckpoint(playerid, 890.5118, -26.0734, 63.7832, 4.0);
timer01 = SetTimerEx("CheckIBd1Trailer", 2000, true, "i", 1);
}
return 1;
}
public CheckIBd1Trailer(vehicleid, trailerid, playerid)
{
if(IsTrailerAttachedToVehicle(IllBillRoadTrain)) return SetPlayerCheckpoint(playerid, -221.9641, 2729.9717, 63.6978, 5.0);
GameTextForPlayer(playerid, "~r~Get the trailer!!~n~~w~if you do not wish to complete the task~n~~r~type /exit", 2000, 3);
SetVehicleParamsForPlayer(IllBillTrailer, playerid, 1, 0); //shows an arrow above the trailer
DisablePlayerCheckpoint(playerid);
return 1;
}
But nothing happends...
Please help me.
~Lorrden