31.10.2018, 16:32
Quote:
./inc/admin.inc(123) : warning 213: tag mismatch
./inc/admin.inc(127) : warning 213: tag mismatch Code:
DestroyDynamic3DTextLabel(PlayerAdminLabel[playerid]); Code:
PlayerAdminLabel[playerid] = CreateDynamic3DTextLabel(ReturnAdminLevel(playerid), 0xFFA500FF, 0.0, 0.0, 0.1, 5.0, .attachedplayer = playerid, .testlos = 1); |
pawn 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[])
{
//pInfo[playerid][Admin]++; Just for tests, you can delete it
if(IsValidDynamic3DTextLabel(Text3D:PlayerAdminLabel[playerid]))
DestroyDynamic3DTextLabel(PlayerAdminLabel[playerid]);
PlayerAdminLabel[playerid] = Text3D:CreateDynamic3DTextLabel(ReturnAdminLevel(playerid), 0xFFA500FF, 0.0, 0.0, 0.1, 5.0, .attachedplayer = playerid, .testlos = 1);
return 1;
}