How to setplayerteam other people that hasn't tag.. - 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 setplayerteam other people that hasn't tag.. (
/showthread.php?tid=450540)
How to setplayerteam other people that hasn't tag.. -
Steezy_ - 13.07.2013
I've made this code but i don't know how to set other people without tag to NO_TEAM..
How could i do that?
E_E
Here is my code..
Код:
public OnPlayerConnect(playerid)
{
if(!strcmp(clantag, "[Daedric]", true))
{
SendClientMessage(playerid, DAEDRIC_COLOUR, "Sei stato riconosciuto come membro di daedric..");
SetPlayerTeam(playerid, 1);
SetPlayerColor(playerid, DAEDRIC_COLOUR);
return 1;
}
if(!strcmp(clantag, "[Test]", true))
{
SendClientMessage(playerid, TEST_COLOUR, "Sei stato riconosciuto come membro di test..");
SetPlayerTeam(playerid, 2);
SetPlayerColor(playerid, TEST_COLOUR);
}
return 1;
}
Re: How to setplayerteam other people that hasn't tag.. -
IstuntmanI - 13.07.2013
pawn Код:
public OnPlayerConnect(playerid)
{
if(!strcmp(clantag, "[Daedric]", true))
{
SendClientMessage(playerid, DAEDRIC_COLOUR, "Sei stato riconosciuto come membro di daedric..");
SetPlayerTeam(playerid, 1);
SetPlayerColor(playerid, DAEDRIC_COLOUR);
return 1;
}
else if(!strcmp(clantag, "[Test]", true))
{
SendClientMessage(playerid, TEST_COLOUR, "Sei stato riconosciuto come membro di test..");
SetPlayerTeam(playerid, 2);
SetPlayerColor(playerid, TEST_COLOUR);
}
else
{
// no tag
}
return 1;
}
Re: How to setplayerteam other people that hasn't tag.. -
mahdi499 - 13.07.2013
pawn Код:
new Team[MAX_PLAYERS]; // A variable to call
public OnPlayerConnect(playerid)
{
if(!strcmp(clantag, "[Daedric]", true))
{
SendClientMessage(playerid, DAEDRIC_COLOUR, "Sei stato riconosciuto come membro di daedric..");
SetPlayerTeam(playerid, 1);
Team[playerid] = 1 // Sets the Variable To Team number
SetPlayerColor(playerid, DAEDRIC_COLOUR);
return 1;
}
if(!strcmp(clantag, "[Test]", true))
{
SendClientMessage(playerid, TEST_COLOUR, "Sei stato riconosciuto come membro di test..");
SetPlayerTeam(playerid, 2);
Team[playerid] = 2 // Sets the Variable To Team number
SetPlayerColor(playerid, TEST_COLOUR);
}
if(Team[playerid] == 0)
{
SendClientMessage(playerid, -1 , " ...... " );
SetPlayerTeam(playerid, 0); // i suppose 0 is no team for you
SetPlayerColor(playerid, -1); // -1 is color white
}
return 1;
}
this will probably fix it
Edit: or the person above me way,i thought of it, but iwanted to make 100% checks on my way,his i think is better
Re: How to setplayerteam other people that hasn't tag.. -
Steezy_ - 13.07.2013
The prob wasn't this.. but thanks anyway
I just wanted to assign NO_TEAM for players that hasn't tag, or atleast not registred tags..