How to make a command a certain gteam?
#1

I tried doing this but
PHP код:
    if(strcmp(cmdtext"/skin"true) == 0)
     {
     if(
gTeam[playerid] == EHUMANO)
    {
        
ShowPlayerDialog(playerid134DIALOG_STYLE_INPUT"Skin Change""Enter the skin id you wish to have below""Confirm""Cancel");
        return 
1;
    }
    } 
It seems people can stilll access if they are a Zombie

Is there a way to block
if(gTeam[playerid] == EZOMBIE)

from using it?
Reply
#2

Can you show me the value of the human and, zombie teams?
Reply
#3

FIRST OF ALL Your command is bad here the fix:
pawn Код:
if(strcmp(cmdtext, "/skin", true) == 0)
    {
     if(gTeam[playerid] == EHUMANO)
    {
        ShowPlayerDialog(playerid, 134, DIALOG_STYLE_INPUT, "Skin Change", "Enter the skin id you wish to have below", "Confirm", "Cancel");
    }    
       return 1;
    }
Second of all give us the define of the human or zombie team like: #define zombie number
Reply
#4

#define EHUMANO 2
#define EZOMBIE 1

and yeah I caught myself there aha, pulled it from my filterscript.
Reply
#5

Where do you set the values?
Reply
#6

pawn Код:
if(strcmp(cmdtext, "/skin", true) == 0)
{
    if(gTeam[playerid] =! EHUMANO)
    {
        return SendClientMessage(playerid, 0xffffffff, "error: your team is not EHUMANO");
    }
    else
    {
        ShowPlayerDialog(playerid, 134, DIALOG_STYLE_INPUT, "Skin Change", "Enter the skin id you wish to have below", "Confirm", "Cancel");
        return 1;
    }
}
if it's not working it means you don't set the player teams properly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)