How To Make Player Spawn In Custom Loc.
#1

Hi,

I'm fairly new to all this, but I'm just wonder, how I can get players to spawn in locations..

I'm using ruNix's CnR gamemode, and people spawn randomly across the map (police do spawn in stations like normal, but just diff spots on map)

So, I wanted to make it a SF map, but I don't know how I can make them spawn there...

any help?
Reply
#2

wiki.sa-mp.com is your best friend take a look at SetPlayerPos on the functions
Reply
#3

pawn Код:
public OnPlayerSpawn(playerid)
{
     new randomspawn = random( number of your spawns );
     switch ( randomspawn )
     {
          case 1 : SetPlayerPos( playerid , x , y , z ) ; // Random Spawn 1
          case 2 : SetPlayerPos( playerid , x , y , z ) ; // Random Spawn 2
          // add more if you want
     }
     return 1;
}
or just follow the samp wiki one

https://sampwiki.blast.hk/wiki/Random
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)