SA-MP Forums Archive
Spawn Not In Place :( - 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: Spawn Not In Place :( (/showthread.php?tid=540658)



Spawn Not In Place :( - professional killer - 06.10.2014

Hello everyone I am having trouble with a race system. After I start a race i am not spawning inside the vehicle but on top of it. My server has got different worlds maybe that has something to do with the problem. I know this is a bug in my server and not in the filterscript as no other person is having this problem.

Please help.

Screenshot -



P.S. - Ignore the lines that say checkpoint has been created... :P


Re: Spawn Not In Place :( - Josh_Main - 06.10.2014

Post your code


Re: Spawn Not In Place :( - professional killer - 06.10.2014

Quote:

CMDtartrace(playerid, params[])
{
if(AutomaticRace == true) return SendClientMessage(playerid, RED, "<!> Not possible. Automatic race is enabled!");
if(BuildRace != 0) return SendClientMessage(playerid, RED, "<!> There's someone building a race!");
if(RaceBusy == 0x01 || RaceStarted == 1) return SendClientMessage(playerid, RED, "<!> There's a race currently. Wait first till race ends!");
if(isnull(params)) return SendClientMessage(playerid, RED, "<!> /startrace [racename]");
LoadRace(playerid, params);
return 1;

here


Re: Spawn Not In Place :( - jueix - 06.10.2014

Can we have the stock / Function of Loadrace?


Re: Spawn Not In Place :( - Matess - 06.10.2014

Yeah it could be problem with virtual world.

pawn Код:
SetVehicleVirtualWorld(vehid, 3);
SetPlayerVirtualWorld(playerid,3);
PutPlayerInVehicle(playerid,vehid,3);



Re: Spawn Not In Place :( - professional killer - 06.10.2014

here is the function of loadrace
Quote:

function LoadRace(playerid, rName[])
{
new
rFile[256],
string[256]
;
format(rFile, sizeof(rFile), "/rRaceSystem/%s.RRACE", rName);
if(!dini_Exists(rFile)) return SendClientMessage(playerid, RED, "<!> Race doesn't exist!"), printf("Race \"%s\" doesn't exist!", rName);
strmid(RaceName, rName, 0, strlen(rName), sizeof(RaceName));
RaceVehicle = dini_Int(rFile, "vModel");
RaceType = dini_Int(rFile, "rType");
RaceMode = dini_Int(rFile, "RaceMode");
TotalCP = dini_Int(rFile, "TotalCP");
printf("VehicleModel: %d", RaceVehicle);
#if DEBUG_RACE == 1
printf("RaceType: %d", RaceType);
printf("RaceMode: %d", RaceMode);
printf("TotalCheckpoints: %d", TotalCP);
#endif




Re: Spawn Not In Place :( - professional killer - 06.10.2014

Quote:

Yeah it could be problem with virtual world.

pawn Code:
SetVehicleVirtualWorld(vehid, 3);
SetPlayerVirtualWorld(playerid,3);
PutPlayerInVehicle(playerid,vehid,3);
__________________

Could u please tell me where should i add that?


Re: Spawn Not In Place :( - Matess - 06.10.2014

FS is probably for world 0 but you are using another on you server didn't you? You can change it in FS or your GM.