Posts: 6,129
Threads: 36
Joined: Jan 2009
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;
}
Posts: 1,063
Threads: 52
Joined: Sep 2011
Reputation:
0
For me works, at a DM Zone I have
Posts: 6,129
Threads: 36
Joined: Jan 2009
..................
Next poster to ignore when they create threads, so I don't write a bunch of code for no reason.
Posts: 6,129
Threads: 36
Joined: Jan 2009
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.
Posts: 434
Threads: 19
Joined: Aug 2011
Reputation:
0
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