03.03.2015, 12:01
I can't get this labels to work...
Код:
CMD:adminduty(playerid, params[]) { if(!PInfo[playerid][Level]) return SendClientMessage(playerid, STEALTH_BLUE, "You need to be level 1 to go on admin duty."); CMDMessageToAdmins(playerid, "ADMINDUTY"); new string[55], pName[MAX_PLAYER_NAME]; new Text3D:AdminLabel; GetPlayerName(playerid, pName, sizeof(pName)); if(!PInfo[playerid][pAdminDuty]) { PInfo[playerid][God] = PInfo[playerid][GodCar] = PInfo[playerid][pAdminDuty] = 1; GetPlayerArmour(playerid, OldArmour[playerid]); OldSkin[playerid] = GetPlayerSkin(playerid); GetPlayerPos(playerid,PosX[playerid],PosY[playerid],PosZ[playerid]); for(new i; i < 13; ++i) { GetPlayerWeaponData(playerid, i, OldWeapon[playerid][i], OldAmmo[playerid][i]); } SetPlayerSkin(playerid, 217); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 38, 99999); format(string, sizeof(string), "Administrator %s is now on Admin Duty.", pName); AdminLabel = Create3DTextLabel("ADMIN ON DUTY\nDO NOT ATTACK",0x33DD1100,0.0, 0.0, 0.0, 40.0, 0, 0); Attach3DTextLabelToPlayer(AdminLabel,playerid, 0.0, 0.0, 0.7); if(PInfo[playerid][ASP] == 1) OldHealth[playerid] = 100.0; else GetPlayerHealth(playerid, OldHealth[playerid]); } else if(PInfo[playerid][pAdminDuty]) { PInfo[playerid][God] = PInfo[playerid][GodCar] = PInfo[playerid][pAdminDuty] = 0; format(string, sizeof(string), "Administrator %s is now off Admin Duty.", pName); SetPlayerSkin(playerid,OldSkin[playerid]); SetPlayerHealth(playerid,OldHealth[playerid]); SetPlayerArmour(playerid, OldArmour[playerid]); SetPlayerPos(playerid,PosX[playerid],PosY[playerid],PosZ[playerid]); ResetPlayerWeapons(playerid); for(new i; i < 13; ++i) { GivePlayerWeapon(playerid, OldWeapon[playerid][i], OldAmmo[playerid][i]); } Delete3DTextLabel(AdminLabel); } SendClientMessageToAll(COLOR_MENUHIGHLIGHT, string); return 1; }