Problem with spawning a vehicle
#7

Quote:
Originally Posted by Boot
Посмотреть сообщение
Try this way:

Код:
CMD:veh(playerid, params[])
{
new car, Float:CarPos[3], string[32];

if(sscanf(params,"d", car)) return SendClientMessage(playerid,0xff0000ff,"USAGE: /Veh <Vehicle ID 400 - 611>");
if(car < 400 || car > 611) return SendClientMessage(playerid, 0xff0000ff, "ERROR: Cannot go under 400 or above 611.");	
if(GetPlayerInterior(playerid) != 0) return 1;

GetPlayerPos(playerid, CarPos[0], CarPos[1], CarPos[2]);
DestroyVehicle(Vehicle[playerid]);
Vehicle[playerid] = CreateVehicle(car, CarPos[0], CarPos[1], CarPos[2] + 2.0, 0, -1, -1, 1);
SetVehicleVirtualWorld(Vehicle[playerid], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, Vehicle[playerid], 0);
format(string,sizeof(string),"You Have Spawned Vehicle ID %i",car);
SendClientMessage(playerid, 0xffffffff, string);
return 1;
}
This one appears to be working.
Reply


Messages In This Thread
Problem with spawning a vehicle - by benjaminjones - 27.08.2015, 23:32
Re: Problem with spawning a vehicle - by bensmart469 - 27.08.2015, 23:52
Re: Problem with spawning a vehicle - by benjaminjones - 28.08.2015, 00:43
Re: Problem with spawning a vehicle - by benjaminjones - 28.08.2015, 14:43
Re: Problem with spawning a vehicle - by Logofero - 28.08.2015, 14:59
Re: Problem with spawning a vehicle - by Boot - 28.08.2015, 15:08
Re: Problem with spawning a vehicle - by benjaminjones - 28.08.2015, 17:32
Re: Problem with spawning a vehicle - by GuthiX - 28.08.2015, 18:10
Re: Problem with spawning a vehicle - by benjaminjones - 28.08.2015, 18:50

Forum Jump:


Users browsing this thread: 1 Guest(s)