05.08.2012, 08:15
Hi! Today I was messing with my code again and I found one strange 'bug':
I add this code:
The strange bug is that when I spawn the vehicle, the screen goes white and it shows Loading... at center of the screen (I've seen this before), but when I spawn the vehicle several times, the screen goes normal and then when I press LMB, it shows me in center of the screen BOMB ARMED (note: I dont have this code in my script). Why is my code messing with singleplayer functions now? I really need help, please.
EDIT: Nevermind, I forgot to add float mark in parameters.
I add this code:
pawn Код:
//code to spawn vehicle blah blah...
KillTimer(Player[playerid][pTimer_UpdateVehicle]);
Player[playerid][pTimer_UpdateVehicle] = SetTimerEx("UpdateSpawnedVehicle",1000,0,"dfff",playerid,xVel,yVel,zVel);
}
return 1;
}
forward UpdateSpawnedVehicle(playerid,xVel,yVel,zVel);
public UpdateSpawnedVehicle(playerid,xVel,yVel,zVel)
{
PutPlayerInVehicle(playerid,Player[playerid][pVehicle],0);
SetVehicleVelocity(Player[playerid][pVehicle],xVel,yVel,zVel);
return 1;
}
EDIT: Nevermind, I forgot to add float mark in parameters.