SA-MP Forums Archive
COMMAND: /me because?? - 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: COMMAND: /me because?? (/showthread.php?tid=502929)



COMMAND: /me because?? - falco3205 - 26.03.2014

i have a small problem!!


PHP код:
    if(strcmp(cmd"/me"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
               if(
IsPlayerConnected(playerid))
                {
                        new 
pname[MAX_PLAYER_NAME];
                        
GetPlayerName(playeridpnamesizeof(pname));
                        
pname[strfind(pname"_"false)] = ' ';
                        
format(stringsizeof(string), "%s: %d"pnametmp);
                        
ProxDetector(30.0playeridstringCOLOR_FADE1COLOR_FADE2COLOR_FADE3COLOR_FADE4COLOR_FADE5);
                }
        }
        return 
1;
    } 



Re: COMMAND: /me because?? - Jacob756 - 26.03.2014

Quote:
Originally Posted by falco3205
Посмотреть сообщение
i have a small problem!!


PHP код:
    if(strcmp(cmd"/me"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
               if(
IsPlayerConnected(playerid))
                {
                        new 
pname[MAX_PLAYER_NAME];
                        
GetPlayerName(playeridpnamesizeof(pname));
                        
pname[strfind(pname"_"false)] = ' ';
                        
format(stringsizeof(string), "%s: %d"pnametmp);
                        
ProxDetector(30.0playeridstringCOLOR_FADE1COLOR_FADE2COLOR_FADE3COLOR_FADE4COLOR_FADE5);
                }
        }
        return 
1;
    } 
What's wrong??

I think it is correct


Re: COMMAND: /me because?? - falco3205 - 26.03.2014

* falco3205 text
in game
Braian_Smith:231
not compared text
sorry for my bad enghlis


Re: COMMAND: /me because?? - ZeroTheScyther - 26.03.2014

pawn Код:
if(strcmp(cmd, "/me", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
               if(IsPlayerConnected(playerid))
                {
                        new pname[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, pname, sizeof(pname));
                        pname[strfind(pname, "_", false)] = ' ';
                        format(string, sizeof(string), "%s:%s", pname, tmp);
                        ProxDetector(30.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
                }
        }
        return 1;
    }
%d for numbers
%s for strings/text


Re: COMMAND: /me because?? - falco3205 - 26.03.2014

Thanks!!