How to disable commands while on Deathmatch Area?
#3

in that /dm code add
SetPVarInt(playerid, "InDm", 1);
then in all your commands (yeah,, a long procedure) add
pawn Код:
if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid, (YOURCOLOR), "You are in DM, you cant use that command!");
else {
//your command here
}
and under home add
pawn Код:
if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid, (YOURCOLOR), "You must use /leavedm to teleport");
report any errors here, so i can fix them for you..

P.S. i am using PVar's as they are easy to understand

EDIT: ^ what kingunit said will also work ^
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)