@ID - SCM PlayerName
#1

Hi,
I have a problem.
I need that to chat write player name with his color name
I work but not work.

Код:
public OnPlayerText(playerid, text[])
{
               new str[150];
                strcat(str, text);
                printf("str:{x} %s{FFFFFF}",GetPlayerColor(playerid),str);
                for(new i; i < strlen(str); i++){
            if(str[i] == '@'){
                new findID[55];
                new pos = strfind(str[i]," ");

                if(pos == -1){
                if(str[i] >= strlen(str)-4){
                                pos = -2;
                        }
                }

                if(pos == -1) continue;
                if(pos == -2){
                        strmid(findID,str,i+1,strlen(str));
                        strdel(str, i,strlen(str));
                }else{
                        strmid(findID,str,i+1,i+strfind(str[i]," "));
                        strdel(str, i,i+strfind(str[i]," "));
                }
                        //strins(text, Nicks[strval(findID)], i,200);
                        new id = strval(findID);
                        if(IsPlayerConnected(id)){
                            new name[30];
                            GetPlayerName(id,name,30);
                            strins(str, name, i,30);
                        }
            }
        }
        SendPlayerMessageToAll(playerid, str);
        }
Reply


Messages In This Thread
@ID - SCM PlayerName - by NiKi123 - 27.07.2014, 19:29
Re: @ID - SCM PlayerName - by NiKi123 - 28.07.2014, 06:01
Re: @ID - SCM PlayerName - by BroZeus - 28.07.2014, 06:07
Re: @ID - SCM PlayerName - by zSuYaNw - 28.07.2014, 06:09
Re: @ID - SCM PlayerName - by NiKi123 - 28.07.2014, 06:20
Re: @ID - SCM PlayerName - by NiKi123 - 28.07.2014, 06:22
Re: @ID - SCM PlayerName - by Ihateyou - 28.07.2014, 06:29
Re: @ID - SCM PlayerName - by zSuYaNw - 28.07.2014, 06:32
Re: @ID - SCM PlayerName - by NiKi123 - 28.07.2014, 06:51
Re: @ID - SCM PlayerName - by NiKi123 - 28.07.2014, 08:00

Forum Jump:


Users browsing this thread: 1 Guest(s)