[Help] OnPlayerInteractVehicle
#4

Just seen you're trying to do some sort of mechanic thing.

I would just use something like this, but you'd have to change the interaction key from Enter, to avoid the player getting in the vehicle.

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys) {
        if((
newkeys KEY_LOOK_LEFT)) //press Q
    
{
        
//Search or make some code to grab the nearest vehicle ID (very easy to find/do)
        
StartFixing(playerid/*Returned closest vehID*/);
    }
    if((
oldkeys KEY_LOOK_LEFT)) //releases Q
    
{
        
StopFixing(playerid);
    } 
Not tested, but should work with a bit of tweaking by yourself.
Reply


Messages In This Thread
[Help] OnPlayerInteractVehicle - by ApolloScripter - 03.12.2018, 17:16
Re: [Help] OnPlayerInteractVehicle - by ItsRobinson - 03.12.2018, 18:21
Re: [Help] OnPlayerInteractVehicle - by ApolloScripter - 03.12.2018, 18:27
Re: [Help] OnPlayerInteractVehicle - by ItsRobinson - 03.12.2018, 18:34
Re: [Help] OnPlayerInteractVehicle - by ApolloScripter - 03.12.2018, 19:44

Forum Jump:


Users browsing this thread: 2 Guest(s)