Hey how to i tele a vehicle
#1

how would i tele the vehicle the player is in if they are in when they type this cmd?

Код:
	if (strcmp("/seafun", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, 2450.2224, -1788.5258, 458.3834);
		SendClientMessage(playerid, 0xAA3333AA, "Welcome to sea fun drive down the tunnel at high speed!");
		SetVehiclePos(vehicleid, 2450.2224, -1788.5258, 458.3834);
		return 1;
	}
Reply
#2

pawn Код:
if (strcmp("/seafun", cmdtext, true, 10) == 0)
{
    if (IsPlayerInAnyVehicle(playerid))
        SetVehiclePos(GetPlayerVehicleID(playerid), 2450.2224, -1788.5258, 458.3834);
    else
        SetPlayerPos(playerid, 2450.2224, -1788.5258, 458.3834);
    SendClientMessage(playerid, 0xAA3333AA, "Welcome to sea fun drive down the tunnel at high speed!");
   
    return 1;
}
Reply
#3

SetPlayerPos() should teleport you with your car if you're in one SetVehiclePos() will teleport the driver with the car if I recall right
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)