help cmds - 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: help cmds (
/showthread.php?tid=123327)
help cmds -
deather - 25.01.2010
how to disable using commands when he has used certain cmds?
Like he should not use commands after join a minigame/race
Re: help cmds - lameguy - 25.01.2010
If you have some adminscript, you could add variable like InMinigame, and set it as 1 when he goes to minigame.
and then add
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(PlayerInfo[InMinigame] == 1) return 0;
}
Re: help cmds -
deather - 25.01.2010
well i dont have one. and i am not going to add one.
Re: help cmds - lameguy - 25.01.2010
Then you could use some Adminscript filterscript, search [fs]Admin or something.
Or use
[FS] JAdmin - Admin Script
Re: help cmds - lameguy - 25.01.2010
Sorry for double post, but i got annother solution:
You can also create new variable called
before main
And when player enters minigame, you would set InMinigame to 1. (InMinigame[playerid] = 1)
When player leaves the minigame, you would set it to 0. InMinigame[playerid] = 0)
And
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(InMinigame[playerid] == 1) return 0 SendClientMessage(playerid, color, "You can't use commands in minigame");
}