Deathmatch..
#1

Hey guys i wonder how to i can make a system which you must exit deathmatch arenas to teleport ...
If you know please post...
Reply
#2

Create a variable for all players and set it to 1 when they're in a deathmatch arena, then in your command check if the value of the variable is set to 1 and don't allow them to teleport.

Example: (pseudo-code)

Near the top of your script:
pawn Code:
new iIsPlayerInDM[MAX_PLAYERS];
Near (or in the area) where you define your commands
pawn Code:
CMD:randomtp(playerid, params[]) {
   if(iIsPlayerInDM[playerid] == 1)
      return SendClientMessage(playerid, -1, "You're already in a DM arena.");

   SetPlayerPos(playerid, 0, 0, 0); // etc
   return 1;
}

CMD:dmarena(playerid, params[]) {
   if(iIsPlayerInDM[playerid] == 1)
      return SendClientMessage(playerid, -1, "You're already in a DM arena.");

   SetPlayerPos(playerid, 0, 0, 0); // etc
   iIsPlayerInDM[playerid] = 1;
   return 1;
}
Reply
#3

Look here!
Reply
#4

Quote:
Originally Posted by Kostas'
View Post
got 232 warnings
Reply
#5

For me works, at a DM Zone I have
Reply
#6

..................

Next poster to ignore when they create threads, so I don't write a bunch of code for no reason.
Reply
#7

Quote:
Originally Posted by Calgon
View Post
..................

Next poster to ignore when they create threads, so I don't write a bunch of code for no reason.
what you mean..
Reply
#8

I posted code to help you and you clearly ignored me, next time I go help people on the forums I'm just going to ignore your threads.
Reply
#9

He means next time you write a thread he's not gonna read it
Cuz you wasted his time by not noticing the fact he answered your question
Reply
#10

Quote:
Originally Posted by Calgon
View Post
I posted code to help you and you clearly ignored me, next time I go help people on the forums I'm just going to ignore your threads.
i didnt say that you didnt help i am actually taking your code to get help and i appreciate it a lot but now my pawno is crashing :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)