Pawno Scripting Issue
#1

Hello folks, as i was on scripting my gamemode, i recived an issue.
The issue was that when i type "@" It should be like: "@CrazyChoco(0): (text)" but when i does it repeat as normal and as the text i did above. this is the part of the code:


pawn Код:
public OnPlayerText(playerid, text[])
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof (name));
    if(gTeam[playerid] == TEAM_PILOT)
    {
        new msg[70];
        format(msg, sizeof(msg), "{429DCE}(Pilot) {C0C0C0}[%s] » {FFFFFF}%s", name, text);
        SendClientMessageToAll(-1, msg);
    }
    if(gTeam[playerid] == TEAM_ATC)
    {
        new msg[70];
        format(msg, sizeof(msg), "{004000}(Air Trafic Controle) {C0C0C0}[%s] » {FFFFFF}%s", name, text);
        SendClientMessageToAll(-1, msg);
    }
    if(gTeam[playerid] == TEAM_BAGAGE)
    {
        new msg[70];
        format(msg, sizeof(msg), "{FF8040}(Bagage) {C0C0C0}[%s] » {FFFFFF}%s", name, text);
        SendClientMessageToAll(-1, msg);
    }
    if(gTeam[playerid] == TEAM_FIRSTOFFICER)
    {
        new msg[70];
        format(msg, sizeof(msg), "{004B97}(First Officer) {C0C0C0}[%s] » {FFFFFF}%s", name, text);
        SendClientMessageToAll(-1, msg);
    }
    if(text[0] == '@')
    {
        new rmsg[256];
        format(rmsg, sizeof(rmsg), "@%s(%d): %s", name, playerid, text[1]);
        SendClientMessageToAll(COLOR_RADIO, rmsg);
        return 0;
    }
    return 0;
}


Thanks



If you didn't understand my problem, ill explain it better
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)