Can you solve this ?
#1

I've made this CMD to add a personal status for admins ..
when you use '/astatus text' a text label will be attached on you when using '/astatus off' or '/astatusoff' it will go

THE PROBLEM: When i use '/astatus off' or '/astatusoff' The text label Disappear for all users, and i want it to disappear for playerid only help please...
Код:
new Text3D:aSTATUS[MAX_PLAYERS];

CMD:astatus(playerid, params[]) // 
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /astatus [text/off]");
	    if(strcmp(params, "off", true) == 0)
	    {
	        Delete3DTextLabel(aSTATUS[playerid]);
		    SendClientMessageEx(playerid, COLOR_WHITE, "You've Turned Off Your Personal MOTD.");
		    return 1;
	    }
	    aSTATUS[playerid] = Create3DTextLabel(params, 0xFFFFFF, 110.0, 110.0, 110.0, 110.0, 0);
            Attach3DTextLabelToPlayer(aSTATUS[playerid], playerid, 0.0, 0.0, 0.0);

	    SendClientMessageEx(playerid, COLOR_WHITE, "You've Adjusted Your Personal MOTD.");
	}
	return 1;
}

CMD:astatusoff(playerid, params[]) //
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        DestroyDynamic3DTextLabel(aSTATUS[playerid]);
        SendClientMessageEx(playerid, COLOR_WHITE, "You've Turned Off Your Personal MOTD.");
    }
	return 1;
}
Reply


Messages In This Thread
Can you solve this ? - by xamen - 14.06.2015, 20:50
Re: Can you solve this ? - by Dangjai - 14.06.2015, 20:56
Re: Can you solve this ? - by xamen - 14.06.2015, 20:59
Re: Can you solve this ? - by Dangjai - 14.06.2015, 21:01
Re: Can you solve this ? - by xamen - 14.06.2015, 21:02
Re: Can you solve this ? - by Dangjai - 14.06.2015, 21:03
Re: Can you solve this ? - by xamen - 14.06.2015, 21:16
Re: Can you solve this ? - by Dangjai - 14.06.2015, 21:32
Re: Can you solve this ? - by xamen - 14.06.2015, 21:37
Re: Can you solve this ? - by Dangjai - 14.06.2015, 22:21

Forum Jump:


Users browsing this thread: 1 Guest(s)