SA-MP Forums Archive
this code is not working - 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: this code is not working (/showthread.php?tid=415067)



this code is not working - akki - 11.02.2013

help me this code is not working when i type the command nothing happens
the code is
Код:
	if (strcmp("/car engine",cmdtext,true,11) == 0)
	{
	    new engine,lights,alarm,doors,bonnet,boot,objective;
	    GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
	    if(engine == 0)
	    {
		    SetVehicleParamsEx(GetPlayerVehicleID(playerid),1,lights,alarm,doors,bonnet,boot,objective);
		    SendClientMessage(playerid,COLOR_WHITE,"you have switched your engine on");
		}
	 	if(engine == 1)
		{
		    SetVehicleParamsEx(GetPlayerVehicleID(playerid),0,lights,alarm,doors,bonnet,boot,objective);
		    SendClientMessage(playerid,COLOR_WHITE,"you have switched your engine off");
		}
	}
please help me