Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
ok i've looked at some peoples posts, but when i add there codes pawno crashs.
anyone got a dm code that disables commands when they tele there?
Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
Thank you sir. apricciate it.
Posts: 180
Threads: 14
Joined: Apr 2008
Reputation:
0
Try this
On the top of your script
new DmZone[MAX_PLAYERS];
OnPlayerConect
DmtZone[playerid] = 0;
OnPlayerDisconnect
DmZone[playerid] = 0;
OnPlayerSpawn
DmtZone[playerid] = 0;
OnPlayerDeath
DmtZone[playerid] = 0;
dcmd_put your command here(const playerid,const params[]){
#pragma unused params
if(DmZone[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"Write /exit");
//Rest of script
return 1;}
Something else if you go to a place for example a dm make sure you put DmtZone[playerid] = 1; in the script that way the commands that have if(DmZone[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"Write /exit"); will work
Also make sure to have and /exit command that changes DmZone[playerid] = 1; to DmtZone[playerid] = 0;
If you need more help just tell me, this system is what i use and it dosen't make any problem in my script