"Stay within the world boundries" problem -
anou1 - 08.01.2014
Hi, I followed a mysql login tutorial, but now when I click on "spawn" button I got a problem of spawn
"Stay within the world boundries"
I found on the forum that's when we have wrong coordonates.
Pastbin:
http://pastebin.com/VKvjmkwm
Could you please help me for this problem ?
Thank you
Re: "Stay within the world boundries" problem -
xeon_inside - 08.01.2014
In OnGameModeInit add this
pawn Код:
AddPlayerClass(134,0,0,0,0,0,0,0,0,0,0);
this happen when there aren't any addplayerclass
Re: "Stay within the world boundries" problem -
anou1 - 08.01.2014
Thank you,
Код:
AddPlayerClass(25,pInfo[playerid][posX], pInfo[playerid][posY],pInfo[playerid][posZ],0,0,0,0,0,0,0);
Is this okay ?
Re: "Stay within the world boundries" problem -
Vince - 08.01.2014
Won't work because OnGameModeInit has no playerid parameter. Just add one random player class, like said above. You can change individual players' spawn info later with SetSpawnInfo.
Re: "Stay within the world boundries" problem -
anou1 - 08.01.2014
Pastbin:
http://pastebin.com/VwjJhuA6
Thank you, now I haven't Stay within world boundries but I always spawn at 0.0,0.0,0.0
What am I doing wrong ?
Thank you
Re: "Stay within the world boundries" problem -
anou1 - 08.01.2014
Код:
public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid, -1, "Connexion rйussie !");
SendClientMessage(playerid,-1, "Le site du serveur est : ");
pInfo[playerid][posX] = cache_get_row_float(0, 7);
pInfo[playerid][posY] = cache_get_row_float(0, 8);
pInfo[playerid][posZ] = cache_get_row_float(0, 9);
SetSpawnInfo( playerid, 0, 0, pInfo[playerid][posX], pInfo[playerid][posY], pInfo[playerid][posZ], 0, 0, 0, 0, 0, 0, 0 );
SetPlayerPos(playerid, pInfo[playerid][posX], pInfo[playerid][posY], pInfo[playerid][posZ]);
return 1;
}
What should I change in this ?
Re: "Stay within the world boundries" problem -
anou1 - 09.01.2014
No idea ?