/me /do comand
#1

Hey, one of my friends made me a /me command once but i lost it. Can one of you give me a new emote command? No login stuff please, since i can make it on my own. Just a simple command with the colours: 0xFFA6FFFF, And a /do command please. Thanks
Reply
#2

Got this from the wiki:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
        SendClientMessageToAll(0xFFFF00AA, str);
        return 1;
    }
    return 0;
pawn Код:
if(strcmp(cmd, "/do", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /do [action]");
                return 1;
            }
            if(PlayerInfo[playerid][pMaskuse] == 1)
            {
                format(string, sizeof(string), "* %s (( Stranger ))", result);
            }
            else
            {
                format(string, sizeof(string), "* %s (( %s ))", result, sendername);
            }
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            printf("%s", string);
        }
        return 1;
    }
Reply
#3

From the /do:

Код:
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : error 017: undefined symbol "sendername"
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : error 017: undefined symbol "sendername"
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : warning 217: loose indentation
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : fatal error 107: too many error messages on one line
Reply
#4

Use ZCMD. Will be a lot easier and better.
Reply
#5

I want to try this out first..
Reply
#6

Quote:
Originally Posted by davelord
Посмотреть сообщение
From the /do:

Код:
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : error 017: undefined symbol "sendername"
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : error 017: undefined symbol "sendername"
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : warning 217: loose indentation
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\runescape priv\gamemodes\roleplaying commands.pwn(102) : fatal error 107: too many error messages on one line

pawn Код:
new sendername;
Reply
#7

pawn Код:
new sendername[24];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)