29.06.2015, 02:11
Can some one tell if where i can find Team chat or clan chat ? Cause i want put it in my script.
#include <a_samp> #include <zcmd> #include <foreach> #include <sscanf> forward TeamChat(playerid,string[]); public TeamChat(playerid,string[]) { foreach(Player,i) { if(GetPlayerTeam(i) == GetPlayerTeam(playerid)) { SendClientMessage(i,-1,string); } } return 1; } CMD:t(playerid,params[]) { new text[128],pName[MAX_PLAYER_NAME],formatted[156]; if(sscanf(params,"s[128]",text)) return SendClientMessage(playerid,-1,"Usage: /t [teamchat text]"); GetPlayerName(playerid,pName,sizeof(pName)); format(formatted,sizeof(formatted),"[Team Chat]: %s(%d): %s",pName,playerid,text); TeamChat(playerid,formatted); return 1; }