Couple Questions. - 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: Couple Questions. (
/showthread.php?tid=196818)
Couple Questions. -
[Comrade] - 06.12.2010
1. Can you see your own SetPlayerChatBubble?
2. How can you make it so instead of command /team to talk to your team, you just just do. For example "! hey" and it will send to your team
Re: Couple Questions. -
[Comrade] - 07.12.2010
Can anyone help?
Re: Couple Questions. -
XePloiT - 07.12.2010
https://sampforum.blast.hk/showthread.php?tid=134865
just change it to how you check team.
Re: Couple Questions. -
fangoth1 - 07.12.2010
define the team and use this
pawn Код:
if(teamid == 1)
SendClientMessageToAll(COLOR_HERE, "message");//your define the message with a string
return 1;)
Re: Couple Questions. -
XePloiT - 07.12.2010
first make sure the 'teamid[MAX_PLAYERS]' is at the top of your GM/FS... then at the OnPlayerConnect define players teamid...( teamid[playerid]={the teams id} // if he has no team define it -1
then..
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '$' && teamid[playerid]!=-1)
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Team Chat: %s: %s",string,text[1]);
return SendMessageToTeam(COLOR_GREEN,string,teamid[playerid]);
}
return 0;
}
stock SendMessageToRAdmins(color,const msg[],tid)
{
for (new i=0; i<MAX_PLAYERS; i++) // i recommend to use foreach(Player,i)
if (IsPlayerConnected(i) && teamid[i]==tid) SendClientMessage(i,color,msg);
}