Team Message - 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: Team Message (
/showthread.php?tid=241906)
Team Message -
marinov - 19.03.2011
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
new string[128], name[MAX_PLAYER_NAME];
format(string,128,"[TEAM] %i: %s",name,text[1]);
SendMessageToTeam(playerid,string);
return 0;
}
return 1;
}
it is showing like :
[TEAM] 0:text
it is showing id, not name, how to fix that ?
Re: Team Message -
blackwave - 19.03.2011
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,128,"[TEAM] %s: %s",name,text[1]);
SendMessageToTeam(playerid,string);
return 0;
}
return 1;
}
Re: Team Message -
marinov - 19.03.2011
Thanks