How do i create a vehicle
#1

Hey guys so i would like to ask how to create a vehicle somewhere in pawn like
there is
Quote:

addplayerclass and create object how can i make the vehicles

Reply
#2

Here's a command:

Код:
CMD:veh(playerid, params[])
{
	if(IsPlayerInAnyVehicle(playerid) || GetVehicleModelIDFromName(params[0]) == -1 ||
        GetVehicleModelIDFromName(params[0]) == 520) return true;
	new car, Float:a;
	GetPlayerFacingAngle(playerid, a);
	new Float:oldposx, Float:oldposy, Float:oldposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	car = CreateVehicle(GetVehicleModelIDFromName(params[0]),oldposx,oldposy,oldposz,0,0,0,-1);
	SetVehicleVirtualWorld(car, GetPlayerVirtualWorld(playerid));
	PutPlayerInVehicle(playerid,car,0);
	return 1;
}
https://sampwiki.blast.hk/wiki/CreateVehicle
Reply
#3

https://sampwiki.blast.hk/wiki/AddStaticVehicle

There you go

________________________
Did i helped you? Click on rep
Reply
#4

@SiraBots, your command doesnt saves up the vehicles when you do a restart.

So, use SAMP or MTA map editor, map them, go to file .map for MTA mapper, then convert it to SAMP using convertffs.com then put the ''CreateVehicle'' or ''AddStaticVehicle'' or smth like that under ''GameModeInIt();"
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)