Show team you on [zcmd] - 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: Show team you on [zcmd] (
/showthread.php?tid=346229)
Show team you on [zcmd] -
cod5devious - 27.05.2012
How do I show what team I am like
Team: [YOUR_TEAM]?
for [zcmd]
Re: Show team you on -
iGetty - 27.05.2012
pawn Код:
command(myteam, playerid, params[])
{
if(GetPlayerTeam(playerid) == 1) SendClientMessage(playerid, WHITE, "Your team is TEAM_ONE");
else if(GetPlayerTeam(playerid) == 2) SendClientMessage(playerid, WHITE, "Your team is TEAM_TWO");
//etc...
return 1;
}
Re: Show team you on -
Audi_Quattrix - 27.05.2012
pawn Код:
new string[128];
format(string,sizeof(string),"Team: %d ",GetPlayerTeam(playerid));
SendClientMessage(playerid,COLOR,string);//COLOR is Color you want message to be..
Re: Show team you on [zcmd] -
cod5devious - 27.05.2012
I edited thread because I forgot to put,
for zcmd
Re: Show team you on [zcmd] -
FalconX - 27.05.2012
Quote:
Originally Posted by cod5devious
I edited thread because I forgot to put,
for zcmd
|
You want something like this?
pawn Код:
CMD:team(playerid, params[])
{
if(!strcmp("id", params)) // /team id
{
new Fstring[10];
format(Fstring,sizeof(Fstring),"Team ID: %d ",GetPlayerTeam(playerid));
SendClientMessage(playerid, -1, Fstring);//-1 is Color you want message to be..
}
else
{
SendClientMessage(playerid, -1, "USAGE: /team id");
}
return 1;
}
-FalconX
Re : Show team you on [zcmd] -
iGetty - 27.05.2012
The one that I posted was for zcmd..
Re: Show team you on [zcmd] -
[ABK]Antonio - 27.05.2012
pawn Код:
stock GetTeamName(playerid)
{
new name[30];
switch(GetPlayerTeam(playerid))
{
case 0: format(name, sizeof(name), "Grove Street");
case 1: format(name, sizeof(name), "Ballas");
case 2: format(name, sizeof(name), "Vagos");
//..etc
}
return name;
}
CMD:myteam(playerid, params[])
{
new string[128];
format(string, sizeof(string), "You're a part of %s", GetTeamName(playerid));
SendClientMessage(playerid, 0x00CCCCAA, string);
return 1;
}
The reason I made it a stock is so you could add it other places...For instance in your /stats command.