Why this command crash the gamemode?
#1

Hello to everyone. I wanted to ask why this command does crash my gamemode! Thanks in advance.
pawn Код:
if(strcmp(cmd, "/vme", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, " You're not logged in.!");
                return 1;
            }
            GetPlayerRPName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[96];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USO: /vme [visual action]");
                return 1;
            }
            if(PlayerInfo[playerid][pMask] == 1)
            {
                format(string, sizeof(string), "> %s", result);
            }
            else
            {
                format(string, sizeof(string), "> %s", result);
            }
            SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 30.0, 15000);
            SendClientMessage(playerid, COLOR_PURPLE, "> %s %s", sendername, result);
        }
        return 1;
    }
Reply


Messages In This Thread
Why this command crash the gamemode? - by alanhutch - 10.08.2013, 19:57
Re: Why this command crash the gamemode? - by BullseyeHawk - 10.08.2013, 20:01
Re: Why this command crash the gamemode? - by alanhutch - 10.08.2013, 20:08
Re: Why this command crash the gamemode? - by BullseyeHawk - 10.08.2013, 20:14
Re: Why this command crash the gamemode? - by alanhutch - 10.08.2013, 20:22

Forum Jump:


Users browsing this thread: 2 Guest(s)