SA-MP Forums Archive
Help!!![Text Problem] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help!!![Text Problem] (/showthread.php?tid=330125)



Help!!![Text Problem] - Cjgogo - 31.03.2012

Problem solved!!!


Re: Help!!![Text Problem] - antonio112 - 31.03.2012

Something's not really right in your code.

You return before you SendClientMessageToAll. .. So there's no way that would work. Try:
pawn Код:
public OnPlayerText(playerid, text[])
{
    new pName[24];
    GetPlayerName(playerid,pName,sizeof(pName));
    new string[256];
    if(gTeam[playerid]==TEAM_ROBBERS) format(string,sizeof(string),"{FFFFFF}%s(%d):%s",pName,playerid,text);
    else if(gTeam[playerid]==TEAM_COPS) format(string,sizeof(string),"{0000FF}%s(%d):{FFFFFF}%s",pName,playerid,text);
    else if(gTeam[playerid]==TEAM_MEDICS) format(string,sizeof(string),"{33AA33}%s(%d):{FFFFFF}%s",pName,playerid,text);
    else if(gTeam[playerid]==TEAM_FIREFIGHTERS) format(string,sizeof(string),"{FF4500}%s(%d):{FFFFFF}%s",pName,playerid,text);
    SendClientMessageToAll(COLOR_WHITE,string);
    return 0;
}



Re: Help!!![Text Problem] - Cjgogo - 31.03.2012

Thank you,it worked!!!

TOPIC CLOSED!!!