22.02.2018, 17:28
PHP код:
new OneSecTime;
new Float:ZPos[MAX_PLAYERS];
stock IsAPlane(carid){switch(GetVehicleModel(carid)){case 592,577,511,512,593,520,553,476,519,460,513,548,417,487,488,497,563,447,469:return true;}return false;}
public OnGameModeInit()
{
OneSecTime = SetTimer("OneSec", 1000,1);
return 1;
}
forward OneSec();
public OneSec()
{
foreach(new i : Player)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(i, x, y, z);
ZPos[i] = z;
if(IsAPlane(GetPlayerVehicleID(i) && ZPos[i] > 30) // Change ZPos as you want
{
// Your Time Script
}
}
}