Posts: 114
Threads: 23
Joined: Dec 2013
Reputation:
0
How to make when player goes to deathmach he cant type any other command but when leaves deathmatch he can ?
Posts: 937
Threads: 106
Joined: Jan 2010
Reputation:
0
When the player starts enters the Death matching arena;
SetPlayerPVInt(playerid, #DM_Arena, 1);
Inside of your commands do:
if(GetPVarInt(playerid, #DM_Arena) == 1) return SendClientMessage, -1, # >> Commands are unavailable at this time.);
Leave this out of the DM arena exit command though. Then once he exits, Delete the PVar.
Otherwise he'll never be able to exit.
Posts: 114
Threads: 23
Joined: Dec 2013
Reputation:
0
how it can loo like a command
Posts: 937
Threads: 106
Joined: Jan 2010
Reputation:
0
No...
if(GetPVarInt(playerid, #DM_Arena) == 1) return SCM(playerid, -1, # >> Commands are unusable at this time.);
That's what prevents him from being able to use the command.
That other part means he can't kill himself if he has lower than 50HP.
Ignore everything else, that's part of my script. It was intended as a Example.
Posts: 114
Threads: 23
Joined: Dec 2013
Reputation:
0
so this if(GetPVarInt(playerid, #DM_Arena) == 1) return SCM(playerid, -1, # >> Commands are unusable at this time.);
should i add to DM join command