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
#2

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

Quote:
Originally Posted by Kinglee
Посмотреть сообщение
CMD:astatusoff(playerid, params[]) //
{
if(PlayerInfo[playerid] >= 0)
{
DestroyDynamic3DTextLabel(aSTATUS[playerid]);
SendClientMessageEx(playerid, COLOR_WHITE, "You've Turned Off Your Personal MOTD.");
}
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 4)

so if the playerid isn't admin level 4+ he can't use the cmd
Reply
#4

Yes.
Reply
#5

The problem when i use /astatus off the text label will disappear for everyone using /astatus
Reply
#6

Quote:
Originally Posted by xamen
Посмотреть сообщение
The problem when i use /astatus off the text label will disappear for everyone using /astatus
You used my code? If not try it.
Reply
#7

Quote:
Originally Posted by Kinglee
Посмотреть сообщение
You used my code? If not try it.
Not working.
Reply
#8

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

Quote:
Originally Posted by Kinglee
Посмотреть сообщение
Код:
CMD:astatusoff(playerid, params[]) //
{
    if(PlayerInfo[playerid] >=0)
    {
        DestroyDynamic3DTextLabel(aSTATUS[pAdmin]);
        SendClientMessageEx(playerid, COLOR_WHITE, "You've Turned Off Your Personal MOTD.");
    }
	return 1;
}
Man! are you kidding me ?
Код:
 if(PlayerInfo[playerid] >=0)
Make no Sense
Reply
#10

I've changed playerid to pAdmin
Код:
        DestroyDynamic3DTextLabel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)