SA-MP Forums Archive
Stock? 1+rep for help - 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: Stock? 1+rep for help (/showthread.php?tid=548841)



Stock? 1+rep for help - [HM]Nicky - 02.12.2014

How to make a stock, for checking if he got trailer attached + in the car with CARID?


EDIT: IsTrailerAttachedToVehicle This one,


Re: Stock? 1+rep for help - Jefff - 02.12.2014

pawn Код:
IsAllOk(playerid, vehicleid)
{
    if(vehicleid == 0 || !IsPlayerInVehicle(playerid, vehicleid)) return 0;
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
    if(!IsTrailerAttachedToVehicle(vehicleid)) return 0;
    return 1;
}
pawn Код:
if(IsAllOk(playerid, GetPlayerVehicleID(playerid)))
{
// player is in vehicleid, driving and got attached trailer
}



Re: Stock? 1+rep for help - [HM]Nicky - 02.12.2014

Thx