Spawn after registering. -
Cubie - 07.09.2017
Working on a server for myself where I can just play around and figure out how things work. I used the script from
Scratch Role Play But I can for the love of anything not figure out why I cannot change the first spawn point to The coordination:
X: -2328.7244
Y: 2298.9382
Z:2.7096
Whatever I do it keeps spawning me inside the unity station after registrering.
I'd love to know what I'm doing wrong so if you're willing to help i'd be very grateful. Thanks.
The GameMode I use:
https://paste.ee/p/BSxTY
Re: Spawn after registering. -
CodeStyle175 - 07.09.2017
why you uploaded whole gamemode?
Re: Spawn after registering. -
Paulice - 07.09.2017
Search for SetSpawnInfo and SetPlayerPos lines, modify the according one.
Re: Spawn after registering. -
BadJih - 07.09.2017
PHP код:
public OnPlayerRequestClass(playerid,classid)
{
SetSpawnInfo(playerid, 0, 26, 1742.9600, -1861.4019, 13.5776, 52.1403, 0, 0, 0, 0, 0, 0); // Without this you'll be kicked when you spawn. Set it to wherever you want.
TogglePlayerSpectating(playerid, true);
SetTimerEx("login_dialog", 100, 0, "i", playerid);
return 1;
}
this one
change " 1742.9600, -1861.4019, 13.5776, 52.1403, 0, 0, 0, 0, 0, 0" to location where you want him to spawn it
Re: Spawn after registering. -
Cubie - 07.09.2017
Quote:
Originally Posted by CodeStyle175
why you uploaded whole gamemode?
|
Because I have no clue on what part of the GM to upload.
Quote:
Originally Posted by Paulice
Search for SetSpawnInfo and SetPlayerPos lines, modify the according one.
|
Quote:
Originally Posted by BadJih
PHP код:
public OnPlayerRequestClass(playerid,classid)
{
SetSpawnInfo(playerid, 0, 26, 1742.9600, -1861.4019, 13.5776, 52.1403, 0, 0, 0, 0, 0, 0); // Without this you'll be kicked when you spawn. Set it to wherever you want.
TogglePlayerSpectating(playerid, true);
SetTimerEx("login_dialog", 100, 0, "i", playerid);
return 1;
}
this one
change " 1742.9600, -1861.4019, 13.5776, 52.1403, 0, 0, 0, 0, 0, 0" to location where you want him to spawn it 
|
Thanks for the response and help but,
it kinda worked, when spawning I do spawn at said coordinates but half a second later it sets my location again.
Re: Spawn after registering. -
BadJih - 07.09.2017
Quote:
Originally Posted by Cubie
Because I have no clue on what part of the GM to upload.
Thanks for the response and help but,
it kinda worked, when spawning I do spawn at said coordinates but half a second later it sets my location again.
|
this one again :
PHP код:
if(PlayerInfo[playerid][pXPos] == 0 && PlayerInfo[playerid][pYPos] == 0 && PlayerInfo[playerid][pZPos] == 0)
{
PlayerInfo[playerid][pXPos] = 1742.9600;
PlayerInfo[playerid][pYPos] = -1861.4019;
PlayerInfo[playerid][pZPos] = 0.2426;
SetPlayerPos(playerid, 1742.9600, -1861.4019, 0.2426);
}
SetPlayerScore(playerid, 1);
LoadPlayerSpawnData(playerid);
edit : 1742.9600, -1861.4019, 0.2426 and thanks
Re: Spawn after registering. -
Cubie - 07.09.2017
Quote:
Originally Posted by BadJih
this one again :
PHP код:
if(PlayerInfo[playerid][pXPos] == 0 && PlayerInfo[playerid][pYPos] == 0 && PlayerInfo[playerid][pZPos] == 0)
{
PlayerInfo[playerid][pXPos] = 1742.9600;
PlayerInfo[playerid][pYPos] = -1861.4019;
PlayerInfo[playerid][pZPos] = 0.2426;
SetPlayerPos(playerid, 1742.9600, -1861.4019, 0.2426);
}
SetPlayerScore(playerid, 1);
LoadPlayerSpawnData(playerid);
edit : 1742.9600, -1861.4019, 0.2426 and thanks 
|
I had to change the coordination at line 18521 but I did it, thank you very much!