Server spawn.
#1

Hello. I disabled the server spawn by pressing shift button, so you gotta register and login to spawn.
I wonder how I can set a coordinate where all players who join will spawn after they've registered and logged in.
Here's the spawn thingys. I don't know what to put in to make all players who join spawn at a sertain location.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
      SetPlayerPos(playerid, 632.0190,-610.6852,31.3359);
      SetPlayerCameraPos(playerid,622.8468,-617.8141,31.6210);
      SetPlayerCameraLookAt(playerid, 637.6628,-596.9312,31.3359);


       return 0;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{

  new pName[MAX_PLAYER_NAME];
  new string[48];
  GetPlayerName(playerid, pName, sizeof(pName));
  format(string, sizeof(string), "%s has connected to the server.", pName);
  SendClientMessageToAll(0xAAAAAAAA, string);

    //time();
    GivePlayerMoney(playerid,10000);
    SendClientMessage(playerid, COLOR_RED, "Welcome to Fredrik's Skandal");
    SendClientMessage(playerid, COLOR_RED, "Write /commands to see the commands");
    SendClientMessage(playerid,COLOR_RED,"Read rules /rules");
    SendClientMessage(playerid,COLOR_RED,"Please login or register! Thank you and have fun!");
    return 1;
}
Thanks.
Reply
#2

I don't fully understand, what do you wan't to do?
Reply
#3

Quote:
Originally Posted by Mikep
I don't fully understand, what do you wan't to do?
i think he means register before spawning
Reply
#4

Quote:
Originally Posted by [Hunter
]
Quote:
Originally Posted by Mikep
I don't fully understand, what do you wan't to do?
i think he means register before spawning
Exactly. As I wrote I've managed to disable the "shift spawn". So what's left to do is to force the players to register and login before spawning.

And the other thing is how I can put out a coordinate where they spawn after logging in. (Sorry if what I'm writing doesn't make any sence. I'm pretty new to scripting + the time is 5:30 am ^^)
Reply
#5

https://sampwiki.blast.hk/wiki/SetSpawnInfo
Reply
#6

Thanks for that one. Now I need help with the /register and /login :3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)