31.10.2018, 18:42
Quote:
Code:
#include <a_samp> #include <zcmd> #include <streamer> new Text3D:PlayerAdminLabel[MAX_PLAYERS]; ReturnAdminLevel(playerid) { new string[64] ; switch (pInfo[playerid][Admin]) { case 1: string= "Moderator"; case 2: string= "Game Administrator"; case 3: string= "Lead Administrator"; case 4: string= "Server Manager"; default: string= "Undefined"; } return string; } CMD:aduty(playerid, params[]) { if(IsAdmin(playerid)) { if(IsOnAdminDuty(playerid)) { if(IsValidDynamic3DTextLabel(PlayerAdminLabel[playerid])) DestroyDynamic3DTextLabel(PlayerAdminLabel[playerid]); PlayerInfo[playerid][pAdminDuty] = 0; SendClientMessage(playerid, COLOR_YELLOW, "You are now off duty."); } else { PlayerAdminLabel[playerid] = CreateDynamic3DTextLabel(ReturnAdminLevel(playerid), 0x8CAA63FF, 0.0, 0.0, 0.1, 5.0, .attachedplayer = playerid, .testlos = 1); SendClientMessage(playerid, COLOR_YELLOW, "You are now on duty as a %s", ReturnAdminLevel(playerid)); PlayerInfo[playerid][pAdminDuty] = 1; } } else return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an Administrator!"); return 1; } Then: Play with the draw distance argument in the native: CreateDynamic3DTextLabel(const text[], color, Float: x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0); So it will become: pawn Code:
|
Everything works. Cheers.