Deathmatch.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Deathmatch.. (
/showthread.php?tid=299520)
Deathmatch.. -
vassilis - 26.11.2011
Hey guys i wonder how to i can make a system which you must exit deathmatch arenas to teleport ...
If you know please post...
Re: Deathmatch.. -
Calgon - 26.11.2011
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;
}
Re: Deathmatch.. -
Kostas' - 26.11.2011
Look here!
Re: Deathmatch.. -
vassilis - 26.11.2011
Quote:
Originally Posted by Kostas'
|
got 232 warnings
Re: Deathmatch.. -
Kostas' - 26.11.2011
For me works, at a DM Zone I have
Re: Deathmatch.. -
Calgon - 26.11.2011
..................
Next poster to ignore when they create threads, so I don't write a bunch of code for no reason.
Re: Deathmatch.. -
vassilis - 26.11.2011
Quote:
Originally Posted by Calgon
..................
Next poster to ignore when they create threads, so I don't write a bunch of code for no reason.
|
what you mean..
Re: Deathmatch.. -
Calgon - 26.11.2011
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.
Re: Deathmatch.. -
Rob_Maate - 26.11.2011
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
Re: Deathmatch.. -
vassilis - 26.11.2011
Quote:
Originally Posted by Calgon
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