[FilterScript] Totally random spawn positions
#1

RandomSpawn
Spawns a player anywhere inside the borders of San Andreas (not underwater or on top of buildings).



.zip (MapAndreas included): Dropbox
Pastebin (MapAndreas required): http://pastebin.com/tdr9KsUQ

Example of usage:

pawn Code:
public OnPlayerSpawn(playerid)
{
    CallRemoteFunction("RandomSpawn", "dd", playerid, 1); //1 if you want to freeze the player until he spawns, 0 if you don't
    return 1;
}
Don't forget to add "plugins mapandreas" and "filterscripts RandomSpawn" to server.cfg.

Enjoy.
Reply
#2

but will it some time spawn in air or water some thing like that ?? but good any way
Reply
#3

Quote:
Originally Posted by AroseKhanNaizi
View Post
but will it some time spawn in air or water some thing like that ?? but good any way
Nope, because of MapAndreas finding the highest point on the coord you specify, then I filter them out with:

pawn Code:
if(z >= 5.0 && z < 30.0)
Reply
#4

Good work.
Reply
#5

Awesome then
Reply
#6

Nice
Reply
#7

Nice & simple.
Reply
#8

This seems simple and nice, but it takes time. Good job.
Reply
#9

First I don't think this is really a filterscript, you could have posted it in Useful Function also why does it need to be a callback function, if it can be a stock function? also why are you using CallLocalFunction instead of Direct Calling (Speed test: http://forum.sa-mp.com/showpost.php?...&postcount=317)
Reply
#10

Quote:
Originally Posted by Patrick_
View Post
First I don't think this is really a filterscript, you could have posted it in Useful Function also why does it need to be a callback function, if it can be a stock function? also why are you using CallLocalFunction instead of Direct Calling (Speed test: http://forum.sa-mp.com/showpost.php?...&postcount=317)
I'm using CallRemoteFunction to call the filterscript function from the gamemode.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)