03.12.2011, 16:37
I already asked that a few days ago, someone answered me.. I asked about making that you wont have to type /engine to drive bicycles..but right now.. I'm trying to make that if you're driving a bicycles you wont have the option to use this commands: /engine , /boot , /bonnet , /lights
here is one of them.. they are all works the same..
What is wrong with it?
here is one of them.. they are all works the same..
pawn Код:
if(strcmp(cmd, "/engine", true) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(vehicleid) != 481 || GetVehicleModel(vehicleid) != 509 || GetVehicleModel(vehicleid) != 510)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s puts the keys and turn on the engine.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(engine == 1)
{
SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s Turn off the engine and take the keys.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD5, " You riding a bicycles!");
}
}
return 1;
}