26.07.2011, 00:47
(
Последний раз редактировалось Jmarr; 26.07.2011 в 01:27.
Причина: Added new question.
)
New question:
How would I make it so that on a key press (the number 2) the engine begins to start, and how would I add a time limit to how long it would take to start it? Like 1 second or something. Thanks!
-------------------------------------------------------------------------
What I need to know, is what is wrong with this code. It's no doubt wrong, I am quite new to pawn. I want it so that when the driver enters the vehicle, the engine turns off (so I can code an ignition feature). This is what I've gotten so far:
How would I make it so that on a key press (the number 2) the engine begins to start, and how would I add a time limit to how long it would take to start it? Like 1 second or something. Thanks!
-------------------------------------------------------------------------
What I need to know, is what is wrong with this code. It's no doubt wrong, I am quite new to pawn. I want it so that when the driver enters the vehicle, the engine turns off (so I can code an ignition feature). This is what I've gotten so far:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, 0, 0, 0, 0, 0);
}
}
return 1;
}