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, 07:27 PM   #1
Huge Clucker
v1k1nG's Avatar
Join Date: Feb 2018
Posts: 435
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;

v1k1nG is offline   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 10:00 PM
Random spawns fuckingcruse Scripting Help 1 12/03/2015 06:11 PM
[HELP]Random Spawns? bajskorv123 Help Archive 2 26/12/2009 09:17 PM
Random Spawns + Previous Spawns XtremeChio Help Archive 2 01/09/2009 01:57 PM
Random spawns _Vortex Help Archive 5 25/08/2009 04:27 PM

All times are GMT. The time now is 09:22 AM.

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