cannot use cmd help - 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: cannot use cmd help (
/showthread.php?tid=251825)
cannot use cmd help -
tanush - 28.04.2011
Can i make if an player does /minigun, they teleport to minigun but they cannot use any commands expect /leavedm
Re: cannot use cmd help -
CrazyBlob - 28.04.2011
yes you can make this
Re: cannot use cmd help -
tanush - 28.04.2011
i neeed help how to make it -.-
Re: cannot use cmd help -
Laronic - 28.04.2011
pawn Код:
new IsPlayerInDMzone[MAX_PLAYERS];
COMMAND:minigun(pplayerid, params[])
{
IsPlayerInDMzone[playerid] = 1;
//stuff stuff
}
COMMAND:leavedm(playerid, params[])
{
IsPlayerInDMzone[playerid] = 0;
//stuff stuff
}
COMMAND:anothercommand(playerid, params[])
{
if(IsPlayerInDMzone[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFAA, "You cannt teleport to another place when your in a DM zone use /leavedm first!");
//stuff stuff
}
Re: cannot use cmd help -
tanush - 28.04.2011
i have to make that in all my cmds 50+ -.-?
Re: cannot use cmd help -
Laronic - 28.04.2011
Yeah, idk if there is a more simple method
i'm not a advanced sripter but i know some ticks
Re: cannot use cmd help -
blackwave - 28.04.2011
pawn Код:
if(IsPlayerInDMzone[playerid] == 1) return 0;
on OnPlayerCommandText (Works for strcmp and dcmd only, since it uses the OnPlayerCommandText callback ).
Re: cannot use cmd help -
tanush - 28.04.2011
how can i make it for zcmd?
Re: cannot use cmd help -
Vince - 28.04.2011
Use OnPlayerCommandReceived.
Re: cannot use cmd help -
Fj0rtizFredde - 28.04.2011
You could do something like this:
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(IsPlayerInDMzone[playerid] == 1) return SendClientMesage(playerid, COLOR, "Get out from /minigun first.");
return 1;
}
Re: cannot use cmd help -
Mauzen - 28.04.2011
Do it like CyberGhost said or modify the zcmd code.
Re: cannot use cmd help -
aircombat - 28.04.2011
in ur gamemode / filterscript :
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(IsPlayerInDMzone[playerid] == 1)
{
SendClientMessage(playerid,COLOR_RED,"You're In Dm Zone You Can't Use Any Command");
return 0;
}
return 1;
}
Edit : Was lagging didn't see above answers