/cmd not for your class!
#1

Need help i have defined team ids in my GM and I have a command /cmd in FS I want to make it unavailable for team id 28 how can i do it. Please post a example code to make me understan the function.
Reply
#2

anyone?
Reply
#3

If you want to share information between your gamemode and a filterscript, you will have to use PVars.

There is loads of information available on here about PVars, but I'd recommend that you look at this tutorial:

https://sampforum.blast.hk/showthread.php?tid=261584

You could also merge your FS with your gamemode and that would eliminate your main problem here.
Reply
#4

pawn Код:
if(GetPlayerTeam(playerid) == 28) // If the player was in team id28
{
    SendClientMessage(playerid, 0xFF0000FF, "The team your in cannot use this command!"); // Telling them they can't use it.
    return 1;
}
Add this to your command.
Reply
#5

Not working, I have defined them something like this:

pawn Код:
#define TEAM_DM 28 //at the top
new gTeam[MAX_PLAYERS];//at the top

SetPlayerTeamFromClass(playerid, classid)
{
    if(classid == 28)
    {
        gTeam[playerid] = TEAM_DM;
    }
}
Reply
#6

Quote:
Originally Posted by jamiesage123
Посмотреть сообщение
If you want to share information between your gamemode and a filterscript, you will have to use PVars.

There is loads of information available on here about PVars, but I'd recommend that you look at this tutorial:

https://sampforum.blast.hk/showthread.php?tid=261584

You could also merge your FS with your gamemode and that would eliminate your main problem here.
Read this post, instead of looking in any given code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)