A command for 1 team only. - 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: A command for 1 team only. (
/showthread.php?tid=232407)
A command for 1 team only. -
101 - 27.02.2011
Well, I want to make a command, it will open a dialog when done but I want to make it for only 1 team (TEAM_SF)
How to do that?
Re: A command for 1 team only. -
Mean - 27.02.2011
pawn Код:
if( gTeam[ playerid ] == TEAM_SF )
{
// If player is TEAM_SF code.
}
else
{
// If player is not TEAM_SF code.
}
If you don't use gTeam, change it to your own variable.
Example:
pawn Код:
if( gTeam[ playerid ] == TEAM_SF )
{
SendClientMessage( playerid, 0xAAAAAA, "You are TEAM_SF" );
}
else
{
SendClientMessage( playerid, 0xAAAAAA, "You are not TEAM_SF" );
}
Re: A command for 1 team only. -
101 - 27.02.2011
Thanks!
And what about only for a person in a specific skin? Such as skin 0 for example.
Re: A command for 1 team only. - Unknown123 - 27.02.2011
pawn Код:
if(GetPlayerSkin(playerid) == 0)
{
SendClientMessage(playerid, 0xFF0000F, "You is using skin id 0");
}
else
{
SendClientMessage(playerid, 0xFF0000F, "You are not using Skin ID 0");
}