[Ajuda] por que isso nгo funciona ?
#1

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if((newkeys == 131072 && (IsPlayerInAnyVehicle(playerid)))
	{
		new m, n, o, p, q, r, s, C;
		C = GetPlayerVehicleID(playerid);
		if(C != INVALID_VEHICLE_ID)
		{
			GetVehicleParamsEx(C, m, n, o, p, q, r, s);
         	SetVehicleParamsEx(C, VEHICLE_PARAMS_ON,  m, n, o, p, q, r, s);
		}	
	}


	return 1;
}

no caso й pra ligar o carro ao apertar N
Reply
#2

Код:
forward motorcarro(playerid);
stock motorcarro(playerid)
{
	if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
 	{
		new mot, lu, alar, por, cap, porma, ob;
		new carro = GetPlayerVehicleID(playerid);
		GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);

		if(mot[carro] == 0)
		{
			SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, VEHICLE_PARAMS_OFF, alar, por, cap, porma, ob);
			Motor[carro] = 1;
			SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!");
			}
			else
			if(motor[carro] == 1)
			{
			SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, alar, por, cap, porma, ob);
			motor[carro] = 0;
			SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Desligado!");
		}
	}
	return 1;
}
nem assim da certo
Reply
#3

Socorro !
Reply
#4

Espero que isso ajude: https://sampforum.blast.hk/showthread.php?tid=658047
Reply
#5

Valeu mano <3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)