Jump to content
  • 0

Problema public OnPlayerEnterVehicle


RaDd0r

Question

Salutare tuturor . Am o problema cu un sistem de texte . Cand dau F intr-o masina ar trebui sa-mi apara urmatorul text : radujet.png . Asa este setat pentru fiecare masina , personala , a unei factiuni , a statului (fara proprietar) s.a.m.d . Problema este ca nu imi apare decat la o parte din masini acel text , la unele masini nu-mi apare (ca de exemplu la LSPD imi apare la fiecare masina , iar la Grove street nu-mi apare decat la o masina) . Aveti idee de ce ? Ma chinui de mult timp sa rezolv aceasta problema si nu ii dau de capat ..

Uitati linia : METIONEZ CA LA COMPILARE NU IMI DA NICI O EROARE/WARNING. (La inceput nu imi facea acest bug pana cand am inceput sa traduc gamemode-ul in romana , si dintr-o data a aparut acest bug.)

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(CarInfo[vehicleid][cLock] == 1)
	{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(playerid, x, y, z);
	}
	new string[128];
	new vehicle[24];
	GetVehicleName(vehicleid, vehicle, sizeof(vehicle));
	for(new i=0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(Spectate[i] != 255)
			{
    			PlayerSpectateVehicle(i,vehicleid);
			}
		}
	}
	if(IsAnOwnableCar(vehicleid))
	{
	   	format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: %s",vehicle, vehicleid, CarInfo[vehicleid][cOwner]);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	}
	else if(IsASalesVehicle(vehicleid))
	{
	    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: Dealership",vehicle, vehicleid);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		format(string,sizeof(string),"Fololeste /v buy pentru a cumpara aceast vehicul la $%d",GetVehiclePrice(vehicleid));
		SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	}
	else
	{
	    if(IsAGangCar(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: Los Aztecas",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsAGangCar2(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: Los Vagos",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsAGangCar3(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: Yakuza",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsAGangCar4(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)  Proprietar: Chornaya Bratva",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsAGangCar5(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: Grove Street",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsAGangCar6(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: Ballas",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsAGangCar7(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: Hitman Company",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsACopCar(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: LSPD",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsAnFbiCar(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: FBI",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsNgCar(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: National Guard",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsASwatCar(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: S.W.A.T",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsATacticalCar(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: Tactical Team",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsASpecialFCar(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: Special Forces",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsAFiremenCar(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar:  La Cosa Nostra",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else if(IsAnAmbulance(vehicleid))
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: L.S.M.D",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
		else
	    {
		    format(string,sizeof(string),"Ati intrat intr-un %s (%d)   Proprietar: The State",vehicle, vehicleid);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		}
	}

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.