Stupid question.
#1

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:

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;
}
Reply
#2

Put ManualVehicleEngineAndLights(); inside your OnGameModeInit
Reply
#3

Works! Thanks.
Reply
#4

Added a new question.
Reply
#5

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
https://sampwiki.blast.hk/wiki/SetTimerEx
Reply
#6

Hmm, I guess I'll have to actually, *gulps* learn something.

Thanks for the links.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)