Spawn after registering.
#1

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
Reply
#2

why you uploaded whole gamemode?
Reply
#3

Search for SetSpawnInfo and SetPlayerPos lines, modify the according one.
Reply
#4

PHP код:
public OnPlayerRequestClass(playerid,classid)
{
    
SetSpawnInfo(playerid0261742.9600, -1861.401913.577652.1403000000); // Without this you'll be kicked when you spawn. Set it to wherever you want.
    
TogglePlayerSpectating(playeridtrue);
    
SetTimerEx("login_dialog"1000"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
Reply
#5

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(playerid0261742.9600, -1861.401913.577652.1403000000); // Without this you'll be kicked when you spawn. Set it to wherever you want.
    
TogglePlayerSpectating(playeridtrue);
    
SetTimerEx("login_dialog"1000"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.
Reply
#6

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] == && PlayerInfo[playerid][pYPos] == && PlayerInfo[playerid][pZPos] == 0)
    {
         
PlayerInfo[playerid][pXPos] = 1742.9600;
           
PlayerInfo[playerid][pYPos] = -1861.4019;
         
PlayerInfo[playerid][pZPos] = 0.2426;
         
SetPlayerPos(playerid1742.9600, -1861.40190.2426);
    }
    
    
SetPlayerScore(playerid1);
    
LoadPlayerSpawnData(playerid); 
edit : 1742.9600, -1861.4019, 0.2426 and thanks
Reply
#7

Quote:
Originally Posted by BadJih
Посмотреть сообщение
this one again :

PHP код:
    if(PlayerInfo[playerid][pXPos] == && PlayerInfo[playerid][pYPos] == && PlayerInfo[playerid][pZPos] == 0)
    {
         
PlayerInfo[playerid][pXPos] = 1742.9600;
           
PlayerInfo[playerid][pYPos] = -1861.4019;
         
PlayerInfo[playerid][pZPos] = 0.2426;
         
SetPlayerPos(playerid1742.9600, -1861.40190.2426);
    }
    
    
SetPlayerScore(playerid1);
    
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!
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)