Team Message
#1

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 ?
Reply
#2

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;
}
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)