14.03.2009, 14:30
hey guys ...
in my code a timer wont work can someone help me?
Someone know why its wont work?
in my code a timer wont work can someone help me?
pawn Код:
//on top
forward GatesOpen();
forward GatesClose();
new side;
new fronta;
new frontb;
new frontc;
//public OnFilterScriptInit()
side = CreateObject(975, -1734.655151, 28.273335, 4.204377, 0.0000, 0.0000, 90.0000);
fronta = CreateObject(980, -1675.952881, 9.499218, 5.328079, 0.0000, 0.0000, 135.0000);
frontb = CreateObject(980, -1667.801880, 1.350600, 5.328079, 0.0000, 0.0000, 135.0000);
frontc = CreateObject(980, -1659.689209, -6.770653, 5.328079, 0.0000, 0.0000, 135.0000);
//a function
public ...(playerid)
{
new string[128];
new pname[24];
GetPlayerName(playerid, pname, sizeof(pname));
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 451)
{
...// my function
SetTimer("GatesClose",3000,0);
SetTimer("...", 120000, 0); // ... means the name of my functions (i dont want tell the name of this funtion)
}
return 1;
}
//the SetTimer("...", 120000, 0);
public ...(playerid) // ... only because i dont want tell his name
{
SetPlayerCheckpoint(playerid, -1539.262817, 133.987518, 2.613937, 8);
SendClientMessageToAll(YELLOW, "..."); // this text will displayed
SetTimer("GatesOpen",8000,0); // this function will called
return 1;
}
// called function SetTimer("GatesOpen",8000,0);
public GatesOpen()
{
SendClientMessageToAll(RED,"hi ho"); // not displayed ( only to test if its work)
MoveObject(side,-1734.655518, 37.611330, 4.204377, 3); // not work
MoveObject(fronta,-1675.952881, 9.499218, 5.328060, 3); // not work
MoveObject(frontb,-1667.801880, 1.350600, 5.328060, 3); // not work
MoveObject(frontc,-1659.689209, -6.770653, 5.328060, 3); // not work
return 0;
}