jeudi 23 juillet 2015

Chat problem onPlayerText

Sup guys i got those codes
@ symbol is The global chat
normal typing ls like Whisper
but when i tpye normaly
hello
it appear only
ello
my codes :)
hope you can help me guys

Code:

public OnPlayerText(playerid,text[])
{
        if(text[0] == '@') {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"@|%s: %s",string,text[1]); SendClientMessageToAll(COLOR_YELLOW,string);}else{
        new Float: x ,Float:y,Float:z;
        GetPlayerPos(playerid,x,y,z);
        for(new i=0;i<MAX_PLAYERS;i++)
        {
        if(IsPlayerConnected(i))
        {
        if(IsPlayerInRangeOfPoint(i,10.0,x,y,z))
        {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"%s Says:%s",string,text[1]); SendClientMessage(i,-1,string);
}
}
}
}
}



Aucun commentaire:

Enregistrer un commentaire