PDA

View Full Version : Vehicle Spawn Issue


JamieVic
13/06/2013, 10:58 AM
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;
}

Parka
13/06/2013, 11:02 AM
rare :/

JamieVic
13/06/2013, 11:21 AM
rare :/

Tell me about it.

ReVo_
13/06/2013, 11:56 AM
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: http://wiki.sa-mp.com/wiki/AddStaticVehicleEx )

JamieVic
13/06/2013, 12:10 PM
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: http://wiki.sa-mp.com/wiki/AddStaticVehicleEx )

That didn't work, but thanks anyways

IstuntmanI
13/06/2013, 02:56 PM
It's not about working, it's about seeing what it returns, just look in the console and say.

ReVo_
13/06/2013, 05:04 PM
Lol? Paste here what logs says.

JamieVic
14/06/2013, 02:22 AM
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, (C)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] (c) 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

ReVo_
17/06/2013, 04:52 PM
the vehicle are created correctly so the problem must be another.
What is your virtual world?

DetoNater
17/06/2013, 05:17 PM
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 :)

Lyksus
17/06/2013, 09:28 PM
Why are they being spawned in the exact same co-ordinates? Just concerned.