SA-MP Forums Archive
Need help! - 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: Need help! (/showthread.php?tid=579292)



Need help! - humayunaftabkhan02 - 26.06.2015

When I join my server and select a skin, I get spawned in the middle of nowhere. Can anyone please help me?

Screenshot :



Re: Need help! - liquor - 26.06.2015

It's kind of obvious your interior ID is wrong.

pawn Код:
SetPlayerInterior(playerid,0);



Re: Need help! - humayunaftabkhan02 - 26.06.2015

When I type /kill and then spawn again at the same place, it's all okay!

I need to suicide for fixing this


Re: Need help! - liquor - 26.06.2015

No, you probably have SetPlayerInterior(playerid,<someinterior>); somwhere in your script that only runs when you join the server.

You need to find that code and remove it, and set interior to 0 instead. But, if you have a system that saves position and interior when you disconnect, and puts you back to your position and interior when you join, you might wanna fix that so it actually sets the correct one.


Re: Need help! - humayunaftabkhan02 - 26.06.2015

It was under OnPlayerRequestClass, It was SetPlayerInterior(playerid,3);.
I made it as you said SetPlayerInterior(playerid,0);

Still I'm spawning in the middle of nowhere.


Re: Need help! - humayunaftabkhan02 - 26.06.2015

IT WORKS!!!!!!!

THANKYOU, +rep



Re: Need help! - liquor - 26.06.2015

Nice! Although, if you have a certain location for when you select skin (this is when OnPlayerRequestClass runs), you might be "in the middle of nowhere" while selecting skin instead.

You should be able to keep interior 3 in OnPlayerRequestClass if you put SetPlayerInterior(playerid,0); at the very end of OnPlayerSpawn.


Re: Need help! - humayunaftabkhan02 - 26.06.2015

Let me check.


Re: Need help! - humayunaftabkhan02 - 26.06.2015

OMG, Thankyousomuch again!

Now I have the interior I wanted and also i'm not in the middle of nowhere in anything!


Re: Need help! - liquor - 26.06.2015

No problem