SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 22/09/2018, 08:27 PM   #1
v1k1nG
Huge Clucker
 
v1k1nG's Avatar
 
Join Date: Feb 2018
Posts: 389
Reputation: 31
Default Random spawn coords in a gangzone

How would you spawn players in a random point, within a zone borders? I am trying to figure it out..

I am using this function to get if player is in zone:

PHP Code:
boolIsPlayerInZone(playeridFloat:minxFloat:minyFloat:maxxFloat:maxy)  {
GetPlayerPos(playeridP[playerid][px], P[playerid][py], P[playerid][pz]);
if (
P[playerid][px] > minx && P[playerid][px] < maxx && P[playerid][py] > miny && P[playerid][py] < maxy) return true;
return 
false;

v1k1nG is online now   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Random Spawns Scropion Scripting Help 6 21/08/2015 11:00 PM
Random spawns fuckingcruse Scripting Help 1 12/03/2015 07:11 PM
[HELP]Random Spawns? bajskorv123 Help Archive 2 26/12/2009 10:17 PM
Random Spawns + Previous Spawns XtremeChio Help Archive 2 01/09/2009 02:57 PM
Random spawns _Vortex Help Archive 5 25/08/2009 05:27 PM


All times are GMT. The time now is 01:37 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.