Need help with chat!
#5

Add this on top of ur script
Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>

new SetSay[MAX_PLAYERS];
add this somewhere
Код:
CMD:setsay(playerid, params[])
{
    new setsay[64];
    if(sscanf(params,"sz",setsay)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /setsay <text>");
    SetSay = setsay;
    return 1;
}


CMD:say(playerid, params[])
{
    new string[128],msg[256],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(sscanf(params,"sz",msg)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /me <text>");
    format(string,sizeof(string),"*%s <%s> %s",pname,SetSay,msg);
    SendClientMessageToAll(COLOR_WHITE,string);
    return 1;
}
Reply


Messages In This Thread
Need help with chat! - by RedbullGD - 10.04.2014, 16:10
Re: Need help with chat! - by superrobot48 - 10.04.2014, 16:26
Re: Need help with chat! - by RedbullGD - 10.04.2014, 16:44
Re: Need help with chat! - by RedbullGD - 11.04.2014, 11:42
Re: Need help with chat! - by superrobot48 - 11.04.2014, 14:42
Re: Need help with chat! - by RedbullGD - 11.04.2014, 16:26
Re: Need help with chat! - by Bingo - 11.04.2014, 16:28
Re : Need help with chat! - by S4t3K - 11.04.2014, 16:40
Re: Need help with chat! - by RedbullGD - 11.04.2014, 18:15
Re: Need help with chat! - by RedbullGD - 11.04.2014, 18:23

Forum Jump:


Users browsing this thread: 1 Guest(s)