Unable to spawn correctly. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Unable to spawn correctly. (
/showthread.php?tid=203211)
Unable to spawn correctly. -
jameskmonger - 26.12.2010
I've got this code (It's in the right place)
Код:
if(listitem == 0) {
pInfo[playerid][spawnX] = -2336.1174;
pInfo[playerid][spawnY] = 2292.6160;
pInfo[playerid][spawnZ] = 4.9844;//Boat
printf("X: %f, Y: %f, Z: %f", pInfo[playerid][spawnX], pInfo[playerid][spawnY], pInfo[playerid][spawnZ]);
SetPlayerPos(playerid, pInfo[playerid][spawnX], pInfo[playerid][spawnY], pInfo[playerid][spawnZ]);
}
And when they select listitem 0, this is printed out:
Quote:
X: -2336.117431, Y: 2292.615966, Z: 4.984399
|
Yet I get told to "stay inside the world boundaries" and my game freezes.
This is what is saved to my character file, also:
Код:
spawnX=-988675584.000000
spawnY=1158629888.000000
spawnZ=1084194816.000000
Re: Unable to spawn correctly. -
Calgon - 26.12.2010
Quote:
Originally Posted by FireCat
Very uneficient code.
pawn Код:
pInfo[playerid][spawnX] = -2336.1174; pInfo[playerid][spawnY] = 2292.6160; pInfo[playerid][spawnZ] = 4.9844;//Boat printf("X: %f, Y: %f, Z: %f", pInfo[playerid][spawnX], pInfo[playerid][spawnY], pInfo[playerid][spawnZ]); SetPlayerPos(playerid,-2336.1174, 2292.6160, 4.9844); }
|
How can you talk about inefficiency when you can't even spell inefficient properly?
Even so, that's not inefficient at all. You have no clue about what you're saying.
Re: Unable to spawn correctly. -
TopAz07 - 26.12.2010
Quote:
Originally Posted by Calgon
How can you talk about inefficiency when you can't even spell inefficient properly?
Even so, that's not inefficient at all. You have no clue about what you're saying.
|
great. lolz
Re: Unable to spawn correctly. -
jameskmonger - 26.12.2010
Oh Calgon, so much love for you.
But does anyone have any ideas?
Re: Unable to spawn correctly. -
jameskmonger - 26.12.2010
I may as well retrieve it from the var, that way there can be no mistakes.
Re: Unable to spawn correctly. -
Calgon - 26.12.2010
Quote:
Originally Posted by FireCat
What? He is retrieving a float from a var, when he can simple retriev from a function.
And yes i do have a clue of what im talking about.
And for your info im from portugal its normal i dont speak english very well!
|
So, call that 0.0001 MS slower? I assume he did it for testing anyway and so he could set their position in OnPlayerSpawn like I instructed him to do so on MSN.
No, I know several people from your country who have flawless English grammar.
Re: Unable to spawn correctly. -
jameskmonger - 26.12.2010
Yes, Calgon, I am going to load it via OnPlayerSpawn, I just want to deduce where the problem is.