Disable ALL commands in a filterscript?
#1

Hello,

For my roleplay script I am going to need animations. Now there are pretty much a lot of good of these filterscripts availeble. When a player is cuffed, tazed, frozen by admins or in any other situation he is not allowed to use animations it must disable it. In the /handsup command I have I use this:

pawn Код:
if(GetPVarInt(playerid, "Injury") == 1 || IsCuffed[playerid] >= 1)
    {
        SendClientMessageEx(playerid, COLOR_GREY, "You are currently injured, tazed or cuffed. Unable to perform animation.");
        return 1;
    }

Now it works fine, but is it posible to download a filterscript and to run these checks at every command in the filterscript?

I thought to myself of using OnPlayerCommandReceived and then run this check. But if I use that in my filterscript, won't it block commands in my gamemode as well?
Reply
#2

When you need to communicate between gamemode and filterscript, the best is to step away from filterscripts and simply putting the commands in your gamemode. All that pvar and remotefunction stuff is slow and ruins the advantages of fast command processors.
Reply
#3

I am aware of that, but I mean to be able to disable commands upon being tazed/injured/etcetera

Else I have to manually adjust every command.
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
Actually, in this case I would say your best bet BY FAR is y_commands. It is compatible with your existing commands (assuming you are using ZCMD), designed to work with multiple scripts at once, and has advanced permission systems so you can quickly and easilly disable and enable any set of commands for any player.
Oh, good to hear.

Is there any tutorial on that?
Reply
#5

yup
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)