SA-MP Forums Archive
Simple question - 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: Simple question (/showthread.php?tid=317449)



Simple question - demonarn - 11.02.2012

If i have this :
pawn Код:
new AirVehicles [] =
{
        592, 577, 511, 512, 593, 520, 553, 476, 519, 460, 513,
        548, 425, 417, 487, 488, 497, 563, 447, 469
};
Can i just put this under onplayerstatechange?
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == AirVehicles)
        {
            SendClientMessage(playerid, red, "You dont know how to start this engine");
            RemovePlayerFromVehicle(playerid);
    }
    return 1;
}
If i need to make a stock or something can anyone explain me how ?

Thanks.


Re: Simple question - [XST]O_x - 11.02.2012

pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
{
    for(new i = 0; i < sizeof(AirVehicles); i++)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == AirVehicles[i])
        {
            SendClientMessage(playerid, red, "You dont know how to start this engine");                    
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}



Re: Simple question - demonarn - 11.02.2012

Ah thank you i didnt really understand it untill now