/r(adio) won't work
#4

Quote:
Originally Posted by Kyle_Olsen
Посмотреть сообщение
pawn Код:
[COMMAND:r(playerid, params[])
{
    new msg[128], copname[40], rchat[128];
    if(PlayerInfo[playerid][pFaction] == 0) return SendClientMessage(playerid,COLOR_WHITE," You are not in a faction");
    if(sscanf(params, "s", rchat)) return SendClientMessage(playerid,COLOR_WHITE," Usage: /r [text]");
    GetPlayerName(playerid, copname, sizeof(copname));
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction])
        {
        format(msg, sizeof(msg), "%s (%i - %s): %s, over.", copname, PlayerInfo[playerid][pFRank], PlayerInfo[playerid][pFRankName], rchat);
        SendClientMessage(i, COLOR_BLUE, msg);
        }
    }
return 1;
}
Try that one

Do you get any errors, anyway?
No errors or warnings. Gonna try yours and Kmitska's solution.

EDIT: Thank you both of you. I got it working. It seemed that the array size of the rchat was too small. I increased it to 200 and it works now.
Reply


Messages In This Thread
/r(adio) won't work - by Outcast - 12.01.2011, 21:02
AW: /r(adio) won't work - by Kmitska - 12.01.2011, 21:07
Re: /r(adio) won't work - by Kyle_Olsen - 12.01.2011, 21:10
Re: /r(adio) won't work - by Outcast - 12.01.2011, 21:15
Re: /r(adio) won't work - by Scenario - 12.01.2011, 21:28
Re: /r(adio) won't work - by Outcast - 12.01.2011, 21:48
Re: /r(adio) won't work - by Scenario - 12.01.2011, 22:03

Forum Jump:


Users browsing this thread: 1 Guest(s)