problem with 3Dlabel
#2

pawn Код:
new Text3D:Label[MAX_PLAYERS];
dcmd_onduty(playerid,params[])
{
    #pragma unused params
    if (AccInfo[playerid][Level] >= 1)
    {
        if(AccInfo[playerid][OnDuty] == 0)
        {
            new string[240];
            new AdminName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, AdminName, sizeof(AdminName));
            AccInfo[playerid][OnDuty] = 1;
             SetPlayerHealth(playerid,100000);
            GivePlayerWeapon(playerid,31,100000); GivePlayerWeapon(playerid,16,100000);
             GivePlayerWeapon(playerid,34,100000); GivePlayerWeapon(playerid,29,100000);
            GivePlayerWeapon(playerid,38,100000); GivePlayerWeapon(playerid,24,100000);
            GivePlayerWeapon(playerid,26,100000); GivePlayerWeapon(playerid,4,1);
            Label[playerid] = Create3DTextLabel("ADMIN ON DUTY[DONT ATTACK]", red, 30.0, 40.0, 50.0, 40.0, 0);
            Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 1.0 );
            format(string, sizeof(string),"[ADMIN]: %s is now on Admin Duty", AdminName);
            AccInfo[playerid][God] = 1;
             return SendClientMessageToAll(green,string);
        }
        else
        {
            new string[240];
            new AdminName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, AdminName, sizeof(AdminName));
            AccInfo[playerid][OnDuty] = 0;
            ResetPlayerWeapons(playerid);
            SetPlayerHealth(playerid,100);
            SetPlayerArmour(playerid,0);
            Delete3DTextLabel(Label[playerid]);
            format(string, sizeof(string),"[ADMIN]: %s is now Off Admin Duty", AdminName);
             AccInfo[playerid][God] = 0;
             return SendClientMessageToAll(orange,string);
        }
    }
    return SendClientMessage(playerid,orange,"Your level is not high enough");
}
Try this not sure it will work though
Reply


Messages In This Thread
problem with 3Dlabel - by mhamadsaleh - 24.01.2012, 13:58
Re: problem with 3Dlabel - by lordturhan - 24.01.2012, 14:12

Forum Jump:


Users browsing this thread: 1 Guest(s)