/V engine
#1

Uh,,..I have bug with my cmd.. when i sit in my car and type /v engine my engine is turned on..i go sit in another car i must 2 x type /v engine first /v engine turning off and now /v engine to turn on..

Eng bad..:S
Код:
if(strcmp(x_nr, "engine", true) == 0)
         	{
				if(IsPlayerInAnyVehicle(playerid))
				{
	 				if(vehid != INVALID_VEHICLE_ID)
					{
						if(EngineStatus[playerid] == 0)
						{
							GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
							SetVehicleParamsEx(vehid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
							EngineStatus[playerid] = 1;
							SendClientMessage(playerid, 0xFFFFFFAA, "{2F991A}Upalio {FFFFFF}si vozilo!");
							format(string, sizeof(string), "* %s je upalio vozilo.", sendername);
   							ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
						}
						else if(EngineStatus[playerid] == 1)
						{
							GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
							SetVehicleParamsEx(vehid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
							EngineStatus[playerid] = 0;
							SendClientMessage(playerid, 0xFFFFFFAA, "{E31919}Ugasio {FFFFFF}si vozilo!");
							format(string, sizeof(string), "* %s je ugasio vozilo.", sendername);
   							ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
						}
					}
				}
				else
	 			{
					SendClientMessage(playerid, 0x00FF00FF, "{E31919}Nisi u vozilu!");
				}
			}
Reply


Messages In This Thread
/V engine - by Danchy - 31.10.2011, 13:39
Re: /V engine - by SuperViper - 31.10.2011, 13:59
Re: /V engine - by Danchy - 31.10.2011, 17:31
Re: /V engine - by Danchy - 01.11.2011, 16:26

Forum Jump:


Users browsing this thread: 1 Guest(s)