[Help] Minigame's - 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)
+--- Thread: [Help] Minigame's (
/showthread.php?tid=350982)
[Help] Minigame's -
mickos - 14.06.2012
Hey there,
I wanna make some minigames. I know how I can make that..
But how can I disable commands for players, when they are in a minigame?
If they try to make a command in a minigame, they will see this message: Sorry you are currectly in a minigame, /kill to leave!
And when a player leaved it they can use commands.
Thanks
BEER-Samp
Re: [Help] Minigame's -
Littlehelper - 14.06.2012
Use a variable or boolean to detect that.
EX:
pawn Code:
new IsInMinigame[MAX_PLAYERS] = 0;
// Under OnPlayerConnect
IsInMinigame[playerid] = 0;
// On Your Commands
if(IsInMinigame[playerid] == 1) return SendClientMessage(playerid,-1,"Type /Kill To Leave");
// /Kill ;p
CMD:kill(playerid,params[])
{
SetPlayerHealth(playerid,0);
IsInMinigame[playerid] = 0;
return 1;
}
Re: [Help] Minigame's -
Kindred - 14.06.2012
You can easily create a variable that sets to 1 when the player is in a minigame, and you can make a stock to check if the player is in a minigame. If he is, you can return a SendClientMessage with the message.
EDIT: Looks like someone already did something similar, post above. Much better to see it then read what I wrote.
Re: [Help] Minigame's -
mickos - 14.06.2012
Quote:
Originally Posted by Kindred
You can easily create a variable that sets to 1 when the player is in a minigame, and you can make a stock to check if the player is in a minigame. If he is, you can return a SendClientMessage with the message.
EDIT: Looks like someone already did something similar, post above. Much better to see it then read what I wrote.
|
Can u show a example of that? And I didnt use ZCMD
Re: [Help] Minigame's -
mickos - 15.06.2012
I didnt use ZCMD, and I didnt know exactly what u mean. Can u send an example of that what u mean? or better info
Re : [Help] Minigame's -
mehdi-jumper - 15.06.2012
Just put your command in your minigame and remove commands in one other gamemode
Re: [Help] Minigame's -
mickos - 15.06.2012
But when I that do, will it again work?
Re: [Help] Minigame's -
Elysian` - 15.06.2012
Try it.
Re: [Help] Minigame's -
mickos - 17.06.2012
Anyone they can help me?
Re: [Help] Minigame's -
Black Wolf - 30.08.2012
Hey i used this method also put IsInMinigame[playerid] = 0; on player death but after death player is still not able to use commands its again saying use /kill