SA-MP Forums Archive
HOW TO BE "/engine" ENGINE ON AND ALSO ENGINE OFF? - 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: HOW TO BE "/engine" ENGINE ON AND ALSO ENGINE OFF? (/showthread.php?tid=654342)



HOW TO BE "/engine" ENGINE ON AND ALSO ENGINE OFF? - hasantemur - 26.05.2018

This is engine off command.
Код:
CMD:engineoff(playerid, params[])
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
			new vehicleid = GetPlayerVehicleID(playerid);
			if(MotorsuzArac(vehicleid))
			    return 1;

    	for(new x = 0; x < MAX_VEHICLES; x++)
		{
        	if(Araclar[x][AracScriptID] == vehicleid)
			{
			    if(Araclar[x][MotorDurum] == 1)
			    {
		  		EmoteMesaj(playerid,5.0, "anahtarı saat yцnьnьn tersine зevirir ve aracın motorunu kapatmaya зalışır.");
				format(MesajString, sizeof(MesajString), "Motor Kapanmıştır - %s",AracIsimleri[GetVehicleModel(vehicleid)-400]);
				DoMesaj(playerid,5.0,MesajString);
		   		Araclar[x][MotorDurum] = 0;
		   		Araclar[x][FarDurum] = 0;
This is engine open command.

Код:
CMD:engine(playerid, params[])
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
			new vehicleid = GetPlayerVehicleID(playerid);
			if(MotorsuzArac(vehicleid))
			    return 1;

    	for(new x = 0; x < MAX_VEHICLES; x++)
		{
        	if(Araclar[x][AracScriptID] == vehicleid)
			{
			    if(Araclar[x][Benzin] <= 0)
			    {
			        return HataMesajiYolla(playerid,"Aracın benzini bitmiş.");
			    }

			    if(Araclar[x][MotorDurum] != 0)
			        return 1;

HOW TO BE "/engine" ENGINE ON AND ALSO ENGINE OFF?



Re: HOW TO BE "/engine" ENGINE ON AND ALSO ENGINE OFF? - xRadical3 - 26.05.2018

what's wrong?