SA-MP Forums Archive
How to make a command a certain gteam? - 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)
+--- Thread: How to make a command a certain gteam? (/showthread.php?tid=283178)



How to make a command a certain gteam? - Oh - 13.09.2011

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?


Re: How to make a command a certain gteam? - Alureon - 13.09.2011

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


Re : How to make a command a certain gteam? - Naruto_Emilio - 13.09.2011

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


Re: How to make a command a certain gteam? - Oh - 13.09.2011

#define EHUMANO 2
#define EZOMBIE 1

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


Re: How to make a command a certain gteam? - Alureon - 13.09.2011

Where do you set the values?


Re: How to make a command a certain gteam? - admantis - 13.09.2011

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.