[Ayuda]: Bug Al Spawnear Un Auto
#1

Hola Chico De Forum Samp, Estoy Haciendo Un GM Desde 0 y Quiero Saber Porque Al Spawnear Un Auto Me Sale Haci
Esta Es La Imagen
http://imgur.com/GAejinL

Este Es Mi Codigo:
PHP код:
stock CrearVehiculo(playerid, model)
{
    if(
IsPlayerInAnyVehicle(playerid))
    {
    
SendClientMessage(playerid, ROJO, "Usted Ya Tiene Un Vehiculo Actualmente!.");
    }
     else
    {
    new 
Float:X, Float:Y, Float:Z, Float:Angle;
    
GetPlayerPos(playerid, X, Y, Z);
    
GetPlayerFacingAngle(playerid, Angle);
    if(
Usuario[playerid][Vehiculo] != -1) CarDeleter(Usuario[playerid][Vehiculo]);
    new 
vehicleid = CreateVehicle(model,X,Y,Z,Angle,VehicleColoursTableRGBA[random(128)],VehicleColoursTableRGBA[random(128)],-1);
    
PutPlayerInVehicle(playerid, vehicleid, 0);
    
SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));
    
LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
    
ChangeVehicleColor(vehicleid, VehicleColoursTableRGBA[random(128)],VehicleColoursTableRGBA[random(128)]);
    
Usuario[playerid][Vehiculo] = vehicleid;
    }
    return 
1;
} 
Reply
#2

Por que usas la misma posiciуn que el jugador.
Sъmale a la posiciуn Z del jugador +5 y solucionado.
SetPlayerPos(playerid, X, Y, Z+5);
Reply
#3

Pon las funciones SetVehicleToVirtualWorld y LinkVehicleToInterior antes de la funciуn PutPlayerInVehicle y prueba nuevamente.
Reply
#4

Quote:
Originally Posted by Toroi
Посмотреть сообщение
Pon las funciones SetVehicleToVirtualWorld y LinkVehicleToInterior antes de la funciуn PutPlayerInVehicle y prueba nuevamente.
Listo Gracias Bro
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)