[AJUDA] Carro Trancado
#1

Alguem me ajuda, Meu gm tem um sistema de casa com veiculo casa e compro a casa ele vem trancado, Destranco ele consigo entrar, Dou gmx No serve e nгo consigo mais entrar no carro nem destrancando . Oque faзo ?

Agradeзo desde jб
Reply
#2

Procure no seu GM por:

SetVehicleParamsForPlayer ou SetVehicleParamsEx.
Reply
#3

Se vocк postasse o cуdigo ficaria muito mais fбcil para nуs ajudarmos vocк ^^.
Reply
#4

Nгo tem nada com SetVehicleParamsEx, Segue as Linhas que comtem SetVehicleParamsForPlayer


Code:
			new keycar;
			if(vehid == PlayerInfo[playerid][pCarKey]) { keycar = PlayerInfo[playerid][pVeiculo]; }
			else if(vehid == PlayerInfo[playerid][pCarKey2]) { keycar = PlayerInfo[playerid][pVeiculo2]; }
	    	if(IsPlayerConnected(playerid))
	        {
	            if(CarInfo[keycar][cLock] == 1)
				{
				for(new i = 0; i < MAX_PLAYERS; i++)
				{
					if(IsPlayerConnected(i)) SetVehicleParamsForPlayer(CarInfo[keycar][ownedvehicle],i,0,0);
				}
				format(string, sizeof(string), "~w~Veiculo VIP~n~~g~Aberto");
				PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
				GameTextForPlayer(playerid, string, 10000, 3);
				CarInfo[keycar][cLock] = 0;
				return 1;
				}
				else
				{
				for(new i = 0; i < MAX_PLAYERS; i++)
				{
					if(IsPlayerConnected(i)) SetVehicleParamsForPlayer(CarInfo[keycar][ownedvehicle],i,0,1);
				}
				format(string, sizeof(string), "~w~Veiculo VIP~n~~r~Trancado");
				PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
				GameTextForPlayer(playerid, string, 10000, 3);
				CarInfo[keycar][cLock] = 1;
				return 1;
				}

			}
			return 1;
		}
E

Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
  	if (VTrancado[vehicleid] >= 1)
	{
		SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1);
	}
	else
	{
		SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0);
	}
	return 1;
}
Reply
#5

Tente isto:

PHP Code:
public OnVehicleStreamIn(vehicleidforplayerid)
{
    if (
CarInfo[vehicleid][cLock] == 1) { SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1); }
    else { 
SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0); }
    return 
1;

Reply
#6

PHP Code:
public OnVehicleStreamIn(vehicleidforplayerid)
{
      if (
CarInfo[vehicleid][cLock] >= 1SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1);
    else 
SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0);
     return 
1;




< ~ clica ae!
Reply
#7

Quote:
Originally Posted by Shadoww5
View Post
Tente isto:

PHP Code:
public OnVehicleStreamIn(vehicleidforplayerid)
{
    if (
CarInfo[vehicleid][cLock] == 1) { SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1); }
    else { 
SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0); }
    return 
1;

Quote:
Originally Posted by Ricop522
View Post
PHP Code:
public OnVehicleStreamIn(vehicleidforplayerid)
{
      if (
CarInfo[vehicleid][cLock] >= 1SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1);
    else 
SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0);
     return 
1;




< ~ clica ae!
Qual a diferenзa ?
Reply
#8

Mais eu mantenho oque tem na Public ou tiro ?
Reply
#9

Sim. Tira a public OnVehicleStreamIn e pхe a que eu postei no lugar dela.
Reply
#10

Tem duas Public's OnVehicleStreamIn :S


ESSA : S

Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
  	if (VTrancado[vehicleid] >= 1)
	{
		SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1);
	}
	else
	{
		SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0);
	}
	return 1;
}
forward LockCar(carid);
E A QUE VSE PEDIU QUE COLOCASSE ESSA:


Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if (CarInfo[vehicleid][cLock] == 1) { SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1); }
    else { SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0); }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)