SA-MP Forums Archive
Vehicle Spawn Issue - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Spawn Issue (/showthread.php?tid=443678)



Vehicle Spawn Issue - JamieVic - 13.06.2013

Only one bicycle seems to spawn.

Код:
public OnGameModeInit()
{
	/* <-------------------------------------------> */
	AddPlayerClass(21,-2382.0168,-582.0441,132.1172,125.2504,0,0,0,0,0,0);
	AddPlayerClass(59,-2382.0168,-582.0441,132.1172,125.2504,0,0,0,0,0,0);
	/* <-------------------------------------------> */
	ShowPlayerMarkers(0);
	ShowNameTags(1);
	DisableInteriorEnterExits();
	EnableStuntBonusForAll(0);
	SetNameTagDrawDistance(10.0);
	// =========== TIMERS ===========
	SetTimer("MoneyUpdate",1000,1);
	SetTimer("SaveAccounts", SECONDS(13), 1);
	//Bicycles
	AddStaticVehicleEx(509,1687.2222,-2294.1111,13.5555,90,0,0,300);
    AddStaticVehicleEx(509,1687.2222,-3004.1111,13.5555,90,1,1,300);
    AddStaticVehicleEx(509,1687.2222,-3014.1111,13.5555,90,2,2,300);
    AddStaticVehicleEx(509,1687.2222,-3024.1111,13.5555,90,3,3,300);
    AddStaticVehicleEx(509,1687.2222,-3034.1111,13.5555,90,4,4,300);
	return 1;
}



Respuesta: Vehicle Spawn Issue - Parka - 13.06.2013

rare :/


Re: Respuesta: Vehicle Spawn Issue - JamieVic - 13.06.2013

Quote:
Originally Posted by Parka
Посмотреть сообщение
rare :/
Tell me about it.


Re: Vehicle Spawn Issue - ReVo_ - 13.06.2013

Код:
	printf("VEHID(0): %d", AddStaticVehicleEx(509,1687.2222,-2294.1111,13.5555,90,0,0,300));
    printf("VEHID(1): %d", AddStaticVehicleEx(509,1687.2222,-3004.1111,13.5555,90,1,1,300));
    printf("VEHID(2): %d", AddStaticVehicleEx(509,1687.2222,-3014.1111,13.5555,90,2,2,300));
    printf("VEHID(3): %d", AddStaticVehicleEx(509,1687.2222,-3024.1111,13.5555,90,3,3,300));
    printf("VEHID(4): %d", AddStaticVehicleEx(509,1687.2222,-3034.1111,13.5555,90,4,4,300));
AddStaticVehicleEx returns INVALID_VEHICLE_ID when AddStaticVehicleEx fails to create ( more info here: https://sampwiki.blast.hk/wiki/AddStaticVehicleEx )


Re: Vehicle Spawn Issue - JamieVic - 13.06.2013

Quote:
Originally Posted by ReVo_
Посмотреть сообщение
Код:
	printf("VEHID(0): %d", AddStaticVehicleEx(509,1687.2222,-2294.1111,13.5555,90,0,0,300));
    printf("VEHID(1): %d", AddStaticVehicleEx(509,1687.2222,-3004.1111,13.5555,90,1,1,300));
    printf("VEHID(2): %d", AddStaticVehicleEx(509,1687.2222,-3014.1111,13.5555,90,2,2,300));
    printf("VEHID(3): %d", AddStaticVehicleEx(509,1687.2222,-3024.1111,13.5555,90,3,3,300));
    printf("VEHID(4): %d", AddStaticVehicleEx(509,1687.2222,-3034.1111,13.5555,90,4,4,300));
AddStaticVehicleEx returns INVALID_VEHICLE_ID when AddStaticVehicleEx fails to create ( more info here: https://sampwiki.blast.hk/wiki/AddStaticVehicleEx )
That didn't work, but thanks anyways


Re: Vehicle Spawn Issue - IstuntmanI - 13.06.2013

It's not about working, it's about seeing what it returns, just look in the console and say.


Re: Vehicle Spawn Issue - ReVo_ - 13.06.2013

Lol? Paste here what logs says.


Re: Vehicle Spawn Issue - JamieVic - 14.06.2013

Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, ©2005-2013 SA-MP Team

[21:11:38] filterscripts = ""  (string)
[21:11:38] 
[21:11:38] Server Plugins
[21:11:38] --------------
[21:11:38]  Loading plugin: streamer
[21:11:38] 

*** Streamer Plugin v2.5.2 by Incognito loaded ***

[21:11:38]   Loaded.
[21:11:38]  Loading plugin: sscanf
[21:11:38] 

[21:11:38]  ===============================

[21:11:38]       sscanf plugin loaded.     

[21:11:38]    © 2009 Alex "******" Cole

[21:11:38]  ===============================

[21:11:38]   Loaded.
[21:11:38]  Loaded 2 plugins.

[21:11:38] 
[21:11:38] Filterscripts
[21:11:38] ---------------
[21:11:38]   Loaded 0 filterscripts.

[21:11:38]  
[21:11:38]  ======================================= 
[21:11:38]  |                                     | 
[21:11:38]  |        YSI version 1.04.0000        | 
[21:11:38]  |        By Alex "******" Cole        | 
[21:11:38]  |                                     | 
[21:11:38]  |  Checking the latest YSI version..  | 
[21:11:38]  |                                     | 
[21:11:38]  ======================================= 
[21:11:38]  
[21:11:38] VEHID(0): 1
[21:11:38] VEHID(1): 2
[21:11:38] VEHID(2): 3
[21:11:38] VEHID(3): 4
[21:11:38] VEHID(4): 5
[21:11:38]  
[21:11:38]  
[21:11:38] Xen Roleplay
[21:11:38]  
[21:11:38]  Script: Aprezt & Jamie
[21:11:38] Number of vehicle models: 1
[21:11:38]  
[21:11:38]  ======================================== 
[21:11:38]  |                                      | 
[21:11:38]  |  Could not connect to update server  | 
[21:11:38]  |    at this time, (your code will     | 
[21:11:38]  |   still work (response was 001)).   | 
[21:11:38]  |                                      | 
[21:11:38]  ======================================== 
[21:11:38]
This also spams my log every 14 seconds

Код:
[12:23:07] write this tag: data
[12:23:21] write this tag: data
[12:23:35] write this tag: data
[12:23:49] write this tag: data
[12:24:03] write this tag: data
[12:24:17] write this tag: data
[12:24:31] write this tag: data
[12:24:45] write this tag: data
[12:24:59] write this tag: data
[12:25:13] write this tag: data
[12:25:27] write this tag: data
[12:25:41] write this tag: data
[12:25:55] write this tag: data
[12:26:09] write this tag: data
[12:26:10] write this tag: data



Re: Vehicle Spawn Issue - ReVo_ - 17.06.2013

the vehicle are created correctly so the problem must be another.
What is your virtual world?


Re: Vehicle Spawn Issue - DetoNater - 17.06.2013

pawn Код:
public OnGameModeInit()
{
    /* <-------------------------------------------> */
    AddPlayerClass(21,-2382.0168,-582.0441,132.1172,125.2504,0,0,0,0,0,0);
    AddPlayerClass(59,-2382.0168,-582.0441,132.1172,125.2504,0,0,0,0,0,0);
    /* <-------------------------------------------> */
    ShowPlayerMarkers(0);
    ShowNameTags(1);
    DisableInteriorEnterExits();
    EnableStuntBonusForAll(0);
    SetNameTagDrawDistance(10.0);
    // =========== TIMERS ===========
    SetTimer("MoneyUpdate",1000,1);
    SetTimer("SaveAccounts", SECONDS(13), 1);
    //Bicycles
    CreateVehicle(509,1687.2222,-2294.1111,13.5555,90,0,0,300);
        CreateVehicle(509,1687.2222,-3014.1111,13.5555,90,2,2,300);
        CreateVehicle(509,1687.2222,-3024.1111,13.5555,90,3,3,300);
        CreateVehicle(509,1687.2222,-3034.1111,13.5555,90,4,4,300);
    return 1;
}

addstaticvehicle might fail, can use this hope it'l work