SA-MP Forums Archive
Problems job - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problems job (/showthread.php?tid=526650)



Problems job - madalin912 - 18.07.2014

When I get into truck, I do not appear that the " You are not trucker " , not going to buy anything.


Re: Problems job - Clad - 18.07.2014

In fact, It doesn't work like this, Even if you don't get the Message when you enter the vehicle it doesn't mean you can't buy a vehicle.
Buying a vehicle is a command.
Please show me this.
pawn Код:
public OnPlayerEnterVehicle



Re: Problems job - madalin912 - 18.07.2014

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new car = gLastCar[playerid];
    if(IsPlayerConnected(playerid))
    {
        if (gGas[playerid] == 0)
        {
            gGas[playerid] = 1;
            GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~p~Fuel Info on", 5000, 5);
            PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
        }
            if(Gas[car] < 100) { Gas[car] = 100; }
        }
        return 1;
}