Edit this code...
#1

Edit this code...
Tuning is not shown

Код:
#include <a_samp>
#include <streamer>

#define COLOR_YELLOW 0xFFFF00AA

new gate1;
new gate2;
new gate3;
new remington;
new sultan;
new slamvan;

public OnFilterScriptInit()
{
	remington = CreateVehicle(534,-2460.57177734,163.75253296,34.79154968,0.00000000,1,1,15); //Remington
	sultan = CreateVehicle(560,-2460.49462891,153.63459778,34.76989746,0.00000000,25,1,15); //Sultan
	slamvan = CreateVehicle(535,-2453.93286133,151.25561523,34.79583740,0.00000000,1,1,15); //Slamvan
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	ChangeVehiclePaintjob(remington,0);
	AddVehicleComponent(remington,1122);
	AddVehicleComponent(remington,1127);
	AddVehicleComponent(remington,1073);
	AddVehicleComponent(remington,1010);
	AddVehicleComponent(remington,1179);
	AddVehicleComponent(remington,1180);
	AddVehicleComponent(remington,1123);
	
	ChangeVehiclePaintjob(sultan,3);
	AddVehicleComponent(sultan,1139);
	AddVehicleComponent(sultan,1026);
	AddVehicleComponent(sultan,1033);
	AddVehicleComponent(sultan,1010);
	AddVehicleComponent(sultan,1075);
	AddVehicleComponent(sultan,1029);
	AddVehicleComponent(sultan,1170);
	AddVehicleComponent(sultan,1140);
	
	ChangeVehiclePaintjob(slamvan,2);
	AddVehicleComponent(slamvan,1117);
	AddVehicleComponent(slamvan,1120);
	AddVehicleComponent(slamvan,1096);
	AddVehicleComponent(slamvan,1010);
	AddVehicleComponent(slamvan,1115);
	AddVehicleComponent(slamvan,1114);
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}
Reply
#2

You're using CreateVehicle. Use AddStaticVehicle because when a CreateVehicle gets destroyed, it goes away, unlike AddStaticVehicle where vehicles respawn on death
Reply
#3

It worked, but when I go to tuning a car is not showing tuning
Reply
#4

You mean when you see it or when you take it to a mod shop?
Reply
#5

I mean the car is placed in a given place, and when I go to it does not appear painjob, wheels, etc.
Reply
#6

And did you use AddStaticVehicle?
Reply
#7

Yes

Код:
remington = AddStaticVehicle(534,-2460.57177734,163.75253296,34.79154968,0.00000000,1,1); //Remington
sultan = AddStaticVehicle(560,-2460.49462891,153.63459778,34.76989746,0.00000000,25,1); //Sultan
slamvan = AddStaticVehicle(535,-2453.93286133,151.25561523,34.79583740,0.00000000,1,1); //Slamvan
Reply
#8

Idea?
Reply
#9

Oh! Use this:

pawn Код:
public OnVehicleRespawn(vehicleid)
{
      if(vehicleid == remington)
      {
               ChangeVehiclePaintjob(remington,0);
            AddVehicleComponent(remington,1122);
            AddVehicleComponent(remington,1127);
            AddVehicleComponent(remington,1073);
            AddVehicleComponent(remington,1010);
            AddVehicleComponent(remington,1179);
            AddVehicleComponent(remington,1180);
            AddVehicleComponent(remington,1123);
      }
}
Indention is crap, sorry
Reply
#10

Did not show tuning

Код:
public OnVehicleSpawn(vehicleid)
{
	if(vehicleid == remington)
	{
		ChangeVehiclePaintjob(remington,0);
		AddVehicleComponent(remington,1122);
		AddVehicleComponent(remington,1127);
		AddVehicleComponent(remington,1073);
		AddVehicleComponent(remington,1010);
		AddVehicleComponent(remington,1179);
		AddVehicleComponent(remington,1180);
		AddVehicleComponent(remington,1123);
	}
	if(vehicleid == sultan)
	{
		ChangeVehiclePaintjob(sultan,3);
		AddVehicleComponent(sultan,1139);
		AddVehicleComponent(sultan,1026);
		AddVehicleComponent(sultan,1033);
		AddVehicleComponent(sultan,1010);
		AddVehicleComponent(sultan,1075);
		AddVehicleComponent(sultan,1029);
		AddVehicleComponent(sultan,1170);
		AddVehicleComponent(sultan,1140);
	}
	if(vehicleid == slamvan)
	{
		ChangeVehiclePaintjob(slamvan,2);
		AddVehicleComponent(slamvan,1117);
		AddVehicleComponent(slamvan,1120);
		AddVehicleComponent(slamvan,1096);
		AddVehicleComponent(slamvan,1010);
		AddVehicleComponent(slamvan,1115);
		AddVehicleComponent(slamvan,1114);
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)