Turfs system
#1

Hello, i would like to know if is possible to use turf system with dynamics families (since i'm using zGaming GM). i don't want to define stable factions i just want to use my dynamics families to own thier gangzone, i followed the tutorial here: https://sampforum.blast.hk/showthread.php?tid=276352 but i would like to know how to make my families gang instead of teams.

i thought about two solutions:
1) Just show gangzone then make cmds to take it over. (but idk how since into gangzone enum there is defined team ID)
2) Define team as families.

Could please someone help me to solve this? thanks in advance.
Reply
#2

pawn Код:
for(new fam=1; fam< MAX_FAMILIES; fam++)
Reply
#3

Where do i should paste it?

ex. on ZoneInfo there are: MinX MinY MaxX MaxY "zTeam"

How do i set the owner of the turf to a family?

I tryed to define families color with team number like:

#define TEAM_CUNEO 1
#define TEAM_TATTAGLIA 2
#define TEAM_CORLEONE 3

but aren't teams they are families i just defined it to make colors exactly.
Reply
#4

replace the team names eg

#define TEAM_GROVE 1
#define TEAM_BALLAS 2
#define TEAM_VAGOS 3

where ever u see that just replace them with the team id

replace TEAM_GROVE with 1

So team id 1 will have that turf.....

for(new fam=1; fam< MAX_FAMILIES; fam++)

all this means is count max families starting from 1

max families just replaces numbers......


pawn Код:
new ZoneInfo[][eZone] = {
    {2337.9004,-1808.8383,2590.2043,-1610.3673,   1},
    {2084.7,-1808.8383,2337.9004,-1610.3673,  2},
    {2590.2043,-1808.8383,2842.3,-1610.3673,   3}
};
new ZoneID[sizeof(ZoneInfo)];
but i do not recommend doing that i would recommend doing something more dynamic

like in the families enum
add something like
pawn Код:
Float:zoneposxmin


Float:zoneposxmax


Float:zoneposymin


Float:zoneposymax

//and then do this

put this where u are creating gang zones
     for(new fam=1; fam< MAX_FAMILIES; fam++)
    {
    {families[fam][zoneposxmin],families[fam][zoneposxmax],families[fam][zoneposymin],families[fam][zoneposymax]}
     }
Reply
#5

Indeed but "for(new fam=1; fam< MAX_FAMILIES; fam++)" can not be paste on the top of gm it must be smting like:

pawn Код:
for(new fam=1; fam< MAX_FAMILIES; fam++)
{
   // do something here
     }
Reply
#6

u can all it in a public or command or stock eg

pawn Код:
//add inside the enum FamZone
or create a new at the top saying

new FamZone[MAX_FAMILIES];

//i will use a public that is already there
public GameModeInit()
{
  for(new fam=1; fam< MAX_FAMILIES; fam++)
 {
  FamZone[i] = GangZoneCreate(families[fam][zoneposxmin],families[fam][zoneposxmax],families[fam][zoneposymin],families[fam][zoneposymax]);
 }
}
Reply
#7

Last thing, in the tutorial ppl are not able to take over a turf! No?

Its needed a cmd to take it over like /taketurf right?
Reply
#8

yeah or a function can be called like if 5 players are in the gang zone and are killed the turf is captured
Reply
#9

Thank you if i need any help i'll post something here. +Rep
Reply
#10

When i define teams i get this error:

error 074: #define pattern must start with an alphabetic character

what to do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)