Vehicle Spawn Problem
#1

Heey guys,

I am using the Huntervehicle(2) filterscript. It works fine but when I change the coords of the Checkpoint, and buy a vehicle, you spawn on the basic position ( I think 0.0, like a new.pwn gamemode.) I tried everything but can't figure it out. I changed Every coord in the script to mine and don't work. There is used a timer ( see the code ) but there is nothing in the timer. (
PHP код:
public OnPlayerLeaveCheckpoint(playerid)
{
    return 
1;

) I put this in it:
PHP код:
SetPlayerPos(playerid,-170.6664,2656.5444,63.3934); 
Then you spawn good when you bought a vehicle BUT: because it is a timer it keep spawning you to the position. When I turn repeat off ( change 1 to 0 ) it doesn't work at all.

Code that I think it can be:

PHP код:
public OnFilterScriptInit()
{
    new playerid;
// CreateCheckpoint(Float:x,Float:y,Float:z,interior,Float:size,Float:distance,showforall)
    DOCP_OnGameModeInit();
    beispielcp2 = CreateCheckpoint(-170.7885,2662.2874,63.2410,0,3,50,false);//Otto
    beispielcp2 = CreateCheckpoint(-170.7885,2662.2874,63.2410,0,3,50,false);//scout and schutz
    beispielcp2 = CreateCheckpoint(-170.7885,2662.2874,63.2410,0,3,50,false); // Gelдnde
       beispielcp2 = CreateCheckpoint(-170.7885,2662.2874,63.2410,0,3,50,false);//Lowrider
    beispielcp2 = CreateCheckpoint(-170.7885,2662.2874,63.2410,0,3,50,false);//grotti
    beispielcp2 = CreateCheckpoint(-170.7885,2662.2874,63.2410,0,3,50,false);//highway
    beispielcp2 = CreateCheckpoint(-170.7885,2662.2874,63.2410,0,3,50,true);//Wang Cars
//    CreateCheckpoint(-1957.8164,256.5306,41.0471,0,4,1000000000000000,true);
    Main();
    CarMenu = CreateMenu("Menu",1,20,120,150,400);
    AddMenuItem(CarMenu,0,"Sell");
    AddMenuItem(CarMenu,0,"Park");
    AddMenuItem(CarMenu,0,"Lock");
    AddMenuItem(CarMenu,0,"Unlock");
    AddMenuItem(CarMenu,0,"Call Car");
    AddMenuItem(CarMenu,0,"Reset Components");
    Carbuy = CreateMenu("Buy a Car",1,20,120,150,400);
    AddMenuItem(Carbuy,0,"Landstalker    $15000");
    AddMenuItem(Carbuy,0,"Bravura        $15000");
    AddMenuItem(Carbuy,0,"Manana        $25000");
    AddMenuItem(Carbuy,0,"Esperanto        $00000");
    AddMenuItem(Carbuy,0,"Solair        $00000");
    AddMenuItem(Carbuy,0,"Regina        $00000");
    AddMenuItem(Carbuy,0,"Picador       $00000");
    AddMenuItem(Carbuy,0,"Clover        $00000");
    Carbuy2 = CreateMenu("Buy a Car",1,20,120,150,400);
    AddMenuItem(Carbuy2,0,"Faggio        $10000");
    AddMenuItem(Carbuy2,0,"Pizzaboy     $00000");
    AddMenuItem(Carbuy2,0,"Sanchez      $10000");
    AddMenuItem(Carbuy2,0,"Quad         $50000");
    AddMenuItem(Carbuy2,0,"BMX          $00000");
    AddMenuItem(Carbuy2,0,"Mountainbike $10000");
    AddMenuItem(Carbuy2,0,"Freeway      $50000");
    AddMenuItem(Carbuy2,0,"FCR-900      $50000");
    AddMenuItem(Carbuy2,0,"NRG-500      $00000");
    AddMenuItem(Carbuy2,0,"PCJ-600      $10000");
    AddMenuItem(Carbuy2,0,"BF-400       $00000");
    AddMenuItem(Carbuy2,0,"Wayfarer     $10000");
    
    Carbuy3 = CreateMenu("Buy a Car",1,20,120,150,400);
    AddMenuItem(Carbuy3,0,"BF Injection    $10000");
    AddMenuItem(Carbuy3,0,"Monster Truck   $00000");
    AddMenuItem(Carbuy3,0,"Monster TruckA  $00000");
    AddMenuItem(Carbuy3,0,"Monster TruckB  $00000");
    AddMenuItem(Carbuy3,0,"Patriot         $00000");
    AddMenuItem(Carbuy3,0,"Rancher         $00000");
    AddMenuItem(Carbuy3,0,"SandKing        $00000");
    AddMenuItem(Carbuy3,0,"Mesa            $00000");
    AddMenuItem(Carbuy3,0,"Rancher         $00000");
    AddMenuItem(Carbuy3,0,"Bandito         $00000");
    AddMenuItem(Carbuy3,0,"Huntley         $00000");
    
    
    
    
    Carbuy4 = CreateMenu("Buy a Car",1,20,120,150,400);
    AddMenuItem(Carbuy4,0,"Voodoo        $10000");
    AddMenuItem(Carbuy4,0,"Remington    $10000");
    AddMenuItem(Carbuy4,0,"Slamvan        $10000");
    AddMenuItem(Carbuy4,0,"Blade        $10000");
    AddMenuItem(Carbuy4,0,"Tahoma        $10000");
    AddMenuItem(Carbuy4,0,"Savanna        $10000");
    AddMenuItem(Carbuy4,0,"Broadway        $10000");
    AddMenuItem(Carbuy4,0,"Tornado        $10000");
    
    
    Carbuy5 = CreateMenu("Buy a Car",1,20,120,150,400);
    AddMenuItem(Carbuy5,0,"Stallion        $10000");
    AddMenuItem(Carbuy5,0,"Gleendale    $10000");
    AddMenuItem(Carbuy5,0,"Oceanic        $10000");
    AddMenuItem(Carbuy5,0,"Hermes        $10000");
    AddMenuItem(Carbuy5,0,"Comet        $10000");//<<??
    
AddMenuItem(Carbuy5,0,"Virgo        $10000");
    
AddMenuItem(Carbuy5,0,"Greenwood    $10000");
    
AddMenuItem(Carbuy5,0,"Windsor        $10000");
    
AddMenuItem(Carbuy5,0,"Sunrise        $10000");
    
AddMenuItem(Carbuy5,0,"Primo        $10000");
    
Carbuy6 CreateMenu("Buy a Car",1,20,120,150,400);
    
AddMenuItem(Carbuy6,0,"Alpha $00000");
    
AddMenuItem(Carbuy6,0,"Blista Compact $00000");
    
AddMenuItem(Carbuy6,0,"Buffalo $00000");
    
AddMenuItem(Carbuy6,0,"Club $00000");
    
AddMenuItem(Carbuy6,0,"Euros $00000");
    
AddMenuItem(Carbuy6,0,"HotringRacer $00000");
    
AddMenuItem(Carbuy6,0,"Sabre $00000");
    
AddMenuItem(Carbuy6,0,"Super GT $00000");
    
AddMenuItem(Carbuy6,0,"ZR-350 $00000");
    
Carbuy7 CreateMenu("Buy a Car",1,20,120,150,400);
    
AddMenuItem(Carbuy7,0,"Flash $00000");
    
AddMenuItem(Carbuy7,0,"Banshee $00000");//
    
AddMenuItem(Carbuy7,0,"Bullet $00000");
    
AddMenuItem(Carbuy7,0,"Cheetah $00000");
    
AddMenuItem(Carbuy7,0,"Infernus $00000");
    
AddMenuItem(Carbuy7,0,"Jester $00000");
    
AddMenuItem(Carbuy7,0,"Phoenix $00000");
    
AddMenuItem(Carbuy7,0,"Turismo $00000");
    
AddMenuItem(Carbuy7,0,"Uranus $00000");
    
SetTimer("OnPlayerLeaveCheckpoint"100001); //THIS IS THE TIMER I AM TALKING ABOUT
    
for(new 0MAX_PLAYERSi++)
    {
        
CarColor[i][0] = 1;
        
CarColor[i][1] = 1;
    }
    for(new 
1MAX_VEHICLESv++)
    {
        
VehicleInfo[v][vModel] = 0;
        
VehicleInfo[v][vX] = 0;
        
VehicleInfo[v][vY] = 0;
        
VehicleInfo[v][vZ] = 0;
        
VehicleInfo[v][vA] = 0;
        
VehicleInfo[v][vColor1] = -1;
        
VehicleInfo[v][vColor2] = -1;
        
VehicleInfo[v][vPaintjob] = -1;
        
format(VehicleInfo[v][vName], MAX_PLAYER_NAME"[NONE]");
        
format(VehicleInfo[v][vOwner], MAX_PLAYER_NAME"[NONE]");
        
VehicleInfo[v][vPark] = 0;
        
VehicleInfo[v][vPX] = 0;
        
VehicleInfo[v][vPY] = 0;
        
VehicleInfo[v][vPZ] = 0;
        
VehicleInfo[v][vPA] = 0;
        for(new 
0MAX_MODSm++) VehicleInfo[v][vMod][m] = 0;
    }
    return 
1;
}
Reply
#2

Anybody?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)