13.07.2012, 12:04
Well i am currently developing a similar script, the way i did it was:
1) I have a "turfsync" function that is called on a loop every second.
2)In the function, it loops through all the players and all the gangzones i created (i saved all thier information in an enum variable). It then checks the position of the playerid in comparision to each gangzone.
3) If the player is inside a turf, it checks to see if the turf is taken yet, if its a free turf, it runs a "captureturf" function..
4) If the turf is owned by someone else, it starts a turf war
1) I have a "turfsync" function that is called on a loop every second.
2)In the function, it loops through all the players and all the gangzones i created (i saved all thier information in an enum variable). It then checks the position of the playerid in comparision to each gangzone.
3) If the player is inside a turf, it checks to see if the turf is taken yet, if its a free turf, it runs a "captureturf" function..
4) If the turf is owned by someone else, it starts a turf war