help cmds
#1

how to disable using commands when he has used certain cmds?
Like he should not use commands after join a minigame/race
Reply
#2

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;
}
Reply
#3

well i dont have one. and i am not going to add one.
Reply
#4

Then you could use some Adminscript filterscript, search [fs]Admin or something.

Or use [FS] JAdmin - Admin Script
Reply
#5

Sorry for double post, but i got annother solution:

You can also create new variable called
pawn Код:
InMinigame[MAX_PLAYERS];
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");
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)