16.06.2013, 15:16
So, I have not designed this script, but whenever the command "Aduty" is inputted, it will create a 3D Label over your head, and the name of the Label in the script is "aDutyText", Well it only presents your rank, and I would like to change that.. I want it to place below my name in Blue Font and I would like for it to say NWRP Administrator above my name in RED font.. I have tried several ways and would be more than happy if somebody could do it for me. That way I can look at what is done and see how it works and learn from it.
My Aduty Prompt.
My Aduty Prompt.
Код:
CMD:aduty(playerid, params[]) { new string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any commands."); if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(!aDuty[playerid]) { format(string, sizeof(string), "AdmWarn: %s has went on admin duty.", RPN(playerid)); SendAdminMessage(COLOR_LGREEN, 1, string); aDuty[playerid] = 1; format(string, sizeof(string), "%s", RPALN(playerid)); if(IsValidDynamic3DTextLabel(aDutyText[playerid])) DestroyDynamic3DTextLabel(aDutyText[playerid]); if(PlayerInfo[playerid][pAdmin] == 1) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 25, playerid); if(PlayerInfo[playerid][pAdmin] == 2) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 25, playerid); if(PlayerInfo[playerid][pAdmin] == 3) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 25, playerid); if(PlayerInfo[playerid][pAdmin] == 4) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 25, playerid); if(PlayerInfo[playerid][pAdmin] == 5) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 25, playerid); if(PlayerInfo[playerid][pAdmin] == 6) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 25, playerid); if(PlayerInfo[playerid][pAdmin] == 7) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 100, playerid); if(PlayerInfo[playerid][pAdmin] == 8) aDutyText[playerid] = CreateDynamic3DTextLabel(string, COLOR_RED, 0, 0, -20, 100, playerid); Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, aDutyText[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25); } else { if(Spec[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't go off admin duty while spectating someone."); aDuty[playerid] = 0; format(string, sizeof(string), "AdmWarn: %s has went off admin duty.", RPN(playerid)); SendAdminMessage(COLOR_YELLOW, 1, string); DestroyDynamic3DTextLabel(aDutyText[playerid]); } return 1; }