Cargive at teleport?
#1

Is there a way like onplayercommand 'example" setcar?
so that when they teleport there they automaticly get that car
Reply
#2

Код:
new vehid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehid, x, y, z);
SetPlayerPos(playerid, x, y, z);
PutPlayerInVehicle(playerid, vehid, 0);
Reply
#3

Quote:
Originally Posted by Relixious
Посмотреть сообщение
Код:
new vehid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehid, x, y, z);
SetPlayerPos(playerid, x, y, z);
PutPlayerInVehicle(playerid, vehid, 0);
That would only give a car when the player is already in a car.

Код:
new Float:x, Float:y, Float:z, Float:angle;
if (IsPlayerInAnyVehicle(playerid)) GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
else GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);

//teleport player here


new vid = CreateVehicle(id of the car you want to spawn, x, y, z, angle, -1, -1, 180);
LinkVehicleToInterior(vid, GetPlayerInterior(playerid));
SetVehicleVirtualWorld(vid, GetPlayerVirtualWorld(playerid));
GameTextForPlayer(playerid, "~g~Vehicle spawned!", 2000, 4);
PutPlayerInVehicle(playerid, vid, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)