How To Disable Command? IN DM
#1

Hy, I'm Have Problem??
I Create Teleport Deatchmatch!
But I'm Can Use Command /v /t and Miscellaneous how to disable it??
but do not disable the command /kill

Sorry for my perfecth english
Reply
#2

Just add a extra variable at the top of the command

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/v", true))
    {
        if(DMVARIABLE[playerid] == 1) return SendClientMessage(playerid, 0xDEEE20FF, "You cannot use this command in a deathmatch");
        return 1;
    }
    return 0;
}
Hope you kinda get what I mean.
Reply
#3

no No No
I use It
Код:
dcmd_v(playerid, params[])
{
	#pragma unused params
	if(IsInDM[playerid] ==1)
    {
        SendClientMessage(playerid,COLOR_RED,"Blah blah /v In Here!!");
        return 1;
    }
    if(nojump2[playerid] ==1)
    {
        SendClientMessage(playerid,COLOR_RED,"Blah blah /v In Here!!");
        return 1;
    }
I Will /nrg /invernus Disable How??
Reply
#4

Just copy

pawn Код:
if(IsInDM[playerid] ==1)
    {
        SendClientMessage(playerid,COLOR_RED,"Blah blah /v In Here!!");
        return 1;
    }
Onto those other commands aswell.
Reply
#5

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Just copy

pawn Код:
if(IsInDM[playerid] ==1)
    {
        SendClientMessage(playerid,COLOR_RED,"Blah blah /v In Here!!");
        return 1;
    }
Onto those other commands aswell.
A faster way is to throw that on OnPlayerCommandText but, the /kill command might not work inside DM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)