20.10.2011, 17:30
try
pawn Код:
else if(strcmp(x_v,"hood",true) == 0)
{
GetPlayerName(playerid,sendername,sizeof(sendername));
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER);
{
SendClientMessage(playerid,COLOR_GREY," You are not even inside a vehicle !");
return 1;
}
if(bonnet == 1)
{
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, false, boot, objective);//toggle bonnet false
format(string, sizeof(string), "* %s closes the vehicle hood.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, true, boot, objective);//toggle bonnet true
format(string, sizeof(string), "* %s opens the vehicle hood.", sendername);
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}