Gang chat
#5

To be honest, I'm not sure if cmdtext has stored the parameters too. By using sscanf:
pawn Код:
if(strcmp(cmd, "/g", true) == 0)
{
    new msg[128];
    if(sscanf(cmdtext, "s[128]", msg)) return SendClientMessage(playerid, -1, "Usage: /g <message>");
   
    strmid(gangChat,msg,1,strlen(msg));

    GetPlayerName(playerid, senderName, sizeof(senderName));
    format(string, sizeof(string),"[BANDA %s:] %s", senderName, gangChat);

    for(new i = 0; i < gangInfo[playerGang[playerid]][1]; i++)
    {
        SendClientMessage(gangMembers[playerGang[playerid]][i], COLOR_LIGHTBLUE, string);
    }
    return 1;
}
Reply


Messages In This Thread
Gang chat - by hnlrasta - 25.09.2013, 17:11
Re: Gang chat - by Konstantinos - 25.09.2013, 17:15
Re: Gang chat - by EiresJason - 25.09.2013, 17:16
Re: Gang chat - by hnlrasta - 25.09.2013, 17:41
Re: Gang chat - by Konstantinos - 25.09.2013, 17:51
Re: Gang chat - by hnlrasta - 25.09.2013, 19:20

Forum Jump:


Users browsing this thread: 1 Guest(s)