17.09.2014, 11:51
(
Последний раз редактировалось PawnOX; 17.09.2014 в 11:52.
Причина: Code Updated!
)
at my /aduty cmd: it shows the 3DLabel text to the player and attach it. but i can see the 3DLabelText through walls, I need your help! I dont wan't like that, i want No one can see that 3DLabelText through walls plus the 3DLabelText isn't deleting when going OFF DUTY (pAdminDuty = 0),
So I want here:
- It can be deleted when going off duty
- It can be attached again when going on duty
- It should not be seen through walls
thats all! thanks for your help i promise i will give an help to you <3 <3
CODE:
So I want here:
- It can be deleted when going off duty
- It can be attached again when going on duty
- It should not be seen through walls
thats all! thanks for your help i promise i will give an help to you <3 <3
CODE:
pawn Код:
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, -1, "This is an admin only command!");
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new Text3D:AdutyLabel = Create3DTextLabel("Admininstrator[ON DUTY] {FF0000}(DO NOT ATTACK!)", 0xFFFF00FF, 30.0, 40.0, 50.0, 40.0, 0);
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
SendClientMessageEx(playerid, COLOR_BLUE, "You are now on Administrator duty! !");
//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerHealth(playerid, 9999999);
SetPlayerArmour(playerid, 9999999);
//SetPlayerColor(playerid, COLOR_TWORANGE);
SetPlayerColor(playerid, COLOR_REALRED);
ResetPlayerWeapons(playerid);
GivePlayerValidWeapon(playerid, 24, 99999);
GivePlayerValidWeapon(playerid, 43, 60000);
GivePlayerValidWeapon(playerid, 24, 60000);
GivePlayerValidWeapon(playerid, 31, 99999);
GivePlayerValidWeapon(playerid, 32, 99999);
GivePlayerValidWeapon(playerid, 27, 99999);
GivePlayerValidWeapon(playerid, 34, 99999);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
GivePlayerValidWeapon(playerid, 38, 99999);
}
new szMessage[47 + (MAX_PLAYER_NAME * 2)];
format(szMessage, sizeof(szMessage), "Administrator %s is now {00FF00}ON {FF0000}Duty!", GetPlayerNameEx(playerid));
//ABroadCast(COLOR_YELLOW,szMessage, 2);
SendClientMessageToAllEx(COLOR_REALRED, szMessage);
Attach3DTextLabelToPlayer(AdutyLabel, playerid, 0.0, 0.0, 0.5);
}
else
{
SendClientMessageEx(playerid, COLOR_BLUE, "You are now off admin duty!");
//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerToTeamColor(playerid);
Delete3DTextLabel(DutyLabel[playerid]);
//SetPlayerSkin(playerid, 299); - Commented by Voltage
PlayerInfo[playerid][pAdminDuty] = 0;
new szMessage[47 + (MAX_PLAYER_NAME * 2)];
format(szMessage, sizeof(szMessage), "Administrator %s is now {800000}OFF {FF0000}Duty!", GetPlayerNameEx(playerid));
//format(szMessage, sizeof(szMessage), "AdmCmd: Administrator %s is now Off Duty!", GetPlayerNameEx(playerid));
// ABroadCast(COLOR_YELLOW,szMessage, 2);
SendClientMessageToAllEx(COLOR_REALRED, szMessage);
DeletePlayer3DTextLabel(playerid, PlayerText3D:AdutyLabel);
}
}
return 1;
}}