How To Disable Command? IN DM - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How To Disable Command? IN DM (
/showthread.php?tid=265690)
How To Disable Command? IN DM -
SmileyForCheat - 02.07.2011
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
Re: How To Disable Command? IN DM -
[HiC]TheKiller - 02.07.2011
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.
Re: How To Disable Command? IN DM -
SmileyForCheat - 02.07.2011
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??
Re: How To Disable Command? IN DM -
[HiC]TheKiller - 02.07.2011
Just copy
pawn Код:
if(IsInDM[playerid] ==1)
{
SendClientMessage(playerid,COLOR_RED,"Blah blah /v In Here!!");
return 1;
}
Onto those other commands aswell.
Re: How To Disable Command? IN DM -
Lorenc_ - 02.07.2011
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