little help
#1

I want to make few zones, Let's say about 10 for example,

I already found an app that creates zones

Код:
new Float:zones_points_0[] = {
	1848.0,-1388.0,1850.0,-1191.0,1451.0,-1170.0,1462.0,-1423.0,1846.0,-1459.0,1848.0,-1388.0
}; //(AREA) SpawnArea1
I want to know how do I put these zones on the map and create timer for each zone and spawns,

For example I set a timer for 15 minutes for zone 1, in that zone 1 people can respawn randomally there only, after 15 minutes pass everybody respawn to zone 2 and same like that till 10,

Any advices tips or some examples?

(with details and explanations please)
Reply
#2

No offence but 95% of your posts are just requests for game-ready systems. You don't even bother looking at the documentation (SA-MP documentation) for syntax.

OT: Create an enum that has all information for the gang zone (zoneid, pos, timer, etc). Assign a variable e.g capturingZone to the player who is capturing it so under OnPlayerSpawn callback you check if he is capturing a zone or not, if yes, set his coordinates to the desired location (Storaged in the enum) When the timer ends, loop through all players that are near the gang zone and teleport them somewhere else.

This is on how to create the gang zone boarders: https://sampforum.blast.hk/showthread.php?tid=250205
This is how you can create an enum & loop through two dimensional arrays: https://sampforum.blast.hk/showthread.php?tid=301933
Reply
#3

Quote:
Originally Posted by Fratello
Посмотреть сообщение
No offence but 95% of your posts are just requests for game-ready systems. You don't even bother looking at the documentation (SA-MP documentation) for syntax.

OT: Create an enum that has all information for the gang zone (zoneid, pos, timer, etc). Assign a variable e.g capturingZone to the player who is capturing it so under OnPlayerSpawn callback you check if he is capturing a zone or not, if yes, set his coordinates to the desired location (Storaged in the enum) When the timer ends, loop through all players that are near the gang zone and teleport them somewhere else.

This is on how to create the gang zone boarders: https://sampforum.blast.hk/showthread.php?tid=250205
This is how you can create an enum & loop through two dimensional arrays: https://sampforum.blast.hk/showthread.php?tid=301933
Thanks, I do look at them and I read tutorials every day I just have hard time understanding them to be honest because I'm not the type of a guy that easily understands stuff, however I'm improving slowly but before I post I always try to make the code before I ask for help.

O.T I don't want to capture zones, I just want people to spawn in them.
Reply
#4

Make an array with x, y and z axis.
When player spawn, use random function to get a random point
and store that random value in a variable
and fetch data from it.

for example you create an array zones_points_0,
just do SetPlayerPos(playerid, zones_points_0[id][0], zones_points_0[id][1], zones_points_0[id][2])
and the id is a variable that stores the random point using random(zones_points_0 - 1);

what more you can do is make an array something like spawn_id[MAX_PLAYERS] and store the previously random selected value in the variable "id" and store in it and when the same point is selected for spawn, you can make the script re select the point.

hope it helps.
Reply
#5

I'll try that thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)