Spawning in capture zone
#1

Hi..

I need a little bit of advice here. I have capturable zones in an enum (owner, spawn coordinates.. etc) . Now I want the player to be able to spawn in these zones (change his spawn point).

I know how to display the possible spawns in a dialog. Spawn through the zones, check if it's owned by his team and then add it to the dialog.

But here comes my question. If he chooses a zone to spawn in.. How can I know which zone he picked? Sometimes he can choose from 5 zones, sometimes 15. And they may be ordered differently.

So under OnPlayerDialogResponse how can I know which zone he chose? I hope you understand me.
Reply
#2

didn't understand, but i think you mean, if he spawned like in swat skin, you want him to spawn in his zone, with his own dialog? u mean this!
Reply
#3

No.. there are teams and teams have zones. Sometimes the teams have captured 5 zones.. sometimes 10. I want to show the zones that the team owns, to the player in a list dialog, and spawn him in whichever zone he chose.

Problem is OnDialogResponse.. when he chose a zone, how do I know which one did he choose?

Because sometimes he owns zones ID: 1, 3, 7. Sometimes zones ID: 2, 4, 6.
Both time 3 options are shown for him.. but how do I know where to spawn him?
Reply
#4

You can make cases, if he used case 0 : SetPlayerPos(playerid, x,y,z); & SetPlayerTeam( .. );
case 2 : SetPlayerPos(playerid,x,y,z); & SetPlayerTeam( .. );
if you want to know where he is spawned , you can make /location, or make a sendclientmessage to the team owner.
forward + puplice like this .
forward SendSwatMessage(color, string[]);
public SendSwatMessage(color, string[])
{
foreach(Player, d)
{
if(PlayerInfo[playerid][swat] [pleader])
{
SendClientMessage(d, color, string);
}
}
}
Reply
#5

You dont understand me at all. I cant use cases because for example, sometimes the first is Zone ID 6, other time the first listitem is Zone ID 9 because the teams capture and lose zones all the time.
Reply
#6

How many zones are exist? Do you have a define for the zones?
And can you give me the code how you can check which team has which zone?
Reply
#7

I don't need it to be done for me. I just need a hint or advice how to do it. They are in an enum and I just add new zones into the enum (it's dynamic). I just check the gCaptureZone[zoneid][zOwnerTeam].
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)