SA-MP Forums Archive
/status not working - 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: /status not working (/showthread.php?tid=313750)



/status not working - geerdinho8 - 27.01.2012

Hey, i made a /status cmd, but it doesn't work, the 3dlabel doesn't appear, i get no errors.

Code:
pawn Код:
if(!strcmp(cmd,"/status",true))
    {
            new sendername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new result[128];
            result = bigstrtok(cmdtext, idx);
            if(!strlen(result))
            {
                SendClientMessage(playerid, red, "USAGE: /status [text]");
                return 1;
            }
            format(string, sizeof(string), "%s",result);
            SetPlayerChatBubble(playerid, string, COLOR_GOLD, 100.0, 600000);
            printf("%s", string);
        return 1;
    }



Re: /status not working - milanosie - 27.01.2012

what do you expect to happen here?


Re: /status not working - geerdinho8 - 27.01.2012

If you do /status test
There has to appear test above your head in COLOR_GOLD, in the form of a chatbubble.


Re: /status not working - Konstantinos - 27.01.2012

Will you test it by yourself? Because if you did, you can not see the Chat Bubble on your head only others people can.


Re: /status not working - geerdinho8 - 27.01.2012

Iknow, i tested it with my brother on two computers.


Re: /status not working - geerdinho8 - 27.01.2012

bumpz-r


Re: /status not working - Jeffry - 27.01.2012

Try this:

pawn Код:
if(!strcmp(cmdtext,"/status",true,7))
{
    if(strlen(cmdtext) == 7 || cmdtext[7] == ' ')
    {
        if(!strlen(cmdtext[8])) return SendClientMessage(playerid, red, "USAGE: /status [text]");
        new string[128];
        format(string, sizeof(string), "%s",cmdtext[8]);
        return SetPlayerChatBubble(playerid, string, COLOR_GOLD, 100.0, 600000);
    }
}