07.05.2014, 14:45
The vehicle I added as a static vehicle does not appear when a player requests a class.
Facts -
1) The static vehicle has been created under OnGameModeInit.
2) The interior and virtual worlds of both the player and vehicle are the SAME.
3) There are NO other filterscripts running that might be interfering.
4) When I connect and try to login, the car won't show up. But when I force class selection AFTER spawning once, the vehicle appears.
The 4th fact can be demonstrated by -
First time after connect (immediately) -
After dying, forcing class selection -
My code -
I've added debugs, etc, nothing. I've tested this with [uL] Pottus - he considers this to be a SA-MP streaming issue (and thanks, by the way!). I'd be glad to receive any help!
Thanks!
Facts -
1) The static vehicle has been created under OnGameModeInit.
2) The interior and virtual worlds of both the player and vehicle are the SAME.
3) There are NO other filterscripts running that might be interfering.
4) When I connect and try to login, the car won't show up. But when I force class selection AFTER spawning once, the vehicle appears.
The 4th fact can be demonstrated by -
First time after connect (immediately) -
After dying, forcing class selection -
My code -
pawn Code:
new vehS = 0;
public OnGameModeInit()
{
...
vehS = AddStaticVehicle(429,-1538.4653,596.7906,6.8617,38.9806,13,13);
...
return 1;
}
public OnPlayerRequestClass(playerid,classid)
{
SetPlayerPos(playerid,-1538.8669,594.3477,7.1813);
SetPlayerFacingAngle(playerid,130.4796);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerCameraPos(playerid, -1543.0037,590.2316,7.1875);
SetPlayerCameraLookAt(playerid, -1538.5853,596.4193,9.4897);
SetVehicleVirtualWorld(vehS, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(vehS, GetPlayerInterior(playerid));
return 1;
}
Thanks!