SA-MP Forums Archive
How to stop a particular command, at a particular place - 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 stop a particular command, at a particular place (/showthread.php?tid=254312)



How to stop a particular command, at a particular place - Ouch_Charlie - 10.05.2011

How to stop particular command, at a particular place
Please tell because i need to stop some commands at DM's ...

Thanks for replies.


Respuesta: How to stop a particular command, at a particular place - o_O - 10.05.2011

Need to make some commands unavailable when there is a certain event?

new DM_EVENT[MAX_PLAYERS];

when player logs in:
pawn Код:
DM_EVENT[playerid] = 0;
when player joins event:
pawn Код:
DM_EVENT[playerid] = 1;
when player leaves event:
pawn Код:
DM_EVENT[playerid] = 0;
when attempting to use the command:

pawn Код:
if(DM_EVENT[playerid] == 1)return SendClientMessage(playerid,COLOR_WHITE,"You cannot use this command, reason: DM event.");



Re: How to stop a particular command, at a particular place - Ouch_Charlie - 10.05.2011

LOL i need to stop some cmds like /v /god and all at DM's :/ Any Help!?!?
Not for Event anyways thanks for reply


Re: How to stop a particular command, at a particular place - jamesbond007 - 10.05.2011

lol use what he said the name doesnt matter event/area/etc..


Re: How to stop a particular command, at a particular place - Ouch_Charlie - 10.05.2011

Quote:
Originally Posted by jamesbond007
Посмотреть сообщение
lol use what he said the name doesnt matter event/area/etc..
Ok thnx i am kinda new at scripting, but i map well :P


Re: Respuesta: How to stop a particular command, at a particular place - Ouch_Charlie - 10.05.2011

Quote:
Originally Posted by o_O
Посмотреть сообщение
Need to make some commands unavailable when there is a certain event?

new DM_EVENT[MAX_PLAYERS];

when player logs in:
pawn Код:
DM_EVENT[playerid] = 0;
when player joins event:
pawn Код:
DM_EVENT[playerid] = 1;
when player leaves event:
pawn Код:
DM_EVENT[playerid] = 0;
when attempting to use the command:

pawn Код:
if(DM_EVENT[playerid] == 1)return SendClientMessage(playerid,COLOR_WHITE,"You cannot use this command, reason: DM event.");
Thanks dude, hope it works