Engine on bikes :S - 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: Engine on bikes :S (
/showthread.php?tid=454704)
Engine on bikes :S -
Donvalley - 30.07.2013
Trying to make it that if the player is the driver but he is in vehicles 510,362,381 or 509 this message doesn't appear.
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && vehicleid != 510 || vehicleid != 462 || vehicleid != 481 || vehicleid != 509);
{
new engine, alarm, bonnet, boot, objective, lights, doors;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
{
SendClientMessage(playerid, COLOR_WHITE,"< To turn on the vehicle engine type {800040}/engine{FFFFFF} - to check radio commands type {800040}/radiohelp{FFFFFF} >");
}
}
Re: Engine on bikes :S -
DarkPower - 30.07.2013
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid), modelid = GetVehicleModel(vehicleid);
if((newstate == PLAYER_STATE_DRIVER) && (modelid != 510 || modelid != 462 || modelid != 481 || modelid != 509))
{
new engine, alarm, bonnet, boot, objective, lights, doors;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
{
SendClientMessage(playerid, COLOR_WHITE,"< To turn on the vehicle engine type {800040}/engine{FFFFFF} - to check radio commands type {800040}/radiohelp{FFFFFF} >");
}
}
Re: Engine on bikes :S -
DobbysGamertag - 30.07.2013
pawn Код:
IsBike(vid)
{
switch (GetVehicleModel(vid))
{
case 510,362,381,509: return 1;
default: return 0;
}
return 0;
}
Then:
pawn Код:
if(newstate == PLAYER_STATE_DRIVER);
{
new engine, alarm, bonnet, boot, objective, lights, doors;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(!IsBike(GetPlayerVehicleID(playerid)))
{
if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
{
SendClientMessage(playerid, COLOR_WHITE,"< To turn on the vehicle engine type {800040}/engine{FFFFFF} - to check radio commands type {800040}/radiohelp{FFFFFF} >");
}
}
}
Give that a go. Use the stock i provided anywhere, although i put them below where i need em. Usually at the bottom of the script.
Re: Engine on bikes :S -
Donvalley - 30.07.2013
Thanks