CMD:aod(playerid, params[])
{
#pragma unused params
new
ARank[128],
string[128]
;
if(pInfo[playerid][AdminLevel] >= 1 || IsPlayerAdmin(playerid))
{
if(GetPVarInt(playerid, "AODMODE") != 1)
{
if(IsPlayerAdmin(playerid))
{
ARank = "Rcon Owner";
}
else
{
switch(pInfo[playerid][AdminLevel])
{
case 1: {ARank = "Beginner Admin";}
case 2: {ARank = "Secretary";}
case 3: {ARank = "Admin Instructor";}
case 4: {ARank = "Director Admin";}
case 5: {ARank = "Owner";}
}
}
if(GetPVarInt(playerid, "PlayerLabel") == 1)
{
SetPVarInt(playerid, "PlayerLabel", 0);
DestroyDynamic3DTextLabel(PlayerLabel[playerid]);
}
SetPVarInt(playerid, "AODMODE", 1);
SetPlayerHealth(playerid, Math.Infinite());
SetPlayerColor(playerid, COLOR_ADMIN);
TextDrawShowForPlayer(playerid, TextdrawAOD[playerid]);
AODLabel[playerid] = CreateDynamic3DTextLabel(ARank, COLOR_ADMIN, 0.0, 0.0, 0.0+0.3, 15.0, playerid, INVALID_VEHICLE_ID, 0, -1, -1);
AODLabel2[playerid] = CreateDynamic3DTextLabel("Admin on Duty!", COLOR_ADMIN, 0.0, 0.0, 0.0+0.4, 15.0, playerid, INVALID_VEHICLE_ID, 0, -1, -1);
format(string, sizeof(string), "[ADMIN]"COL_WHITE" %s is now On Duty!, use /ask to formulate any question", GetPlayerName(playerid));
SendClientMessageToAll(COLOR_ADMIN, string);
}
else if(GetPVarInt(playerid, "AODMODE") == 1)
{
SetPVarInt(playerid, "AODMODE", 0);
SetPlayerColor(playerid, COLOR_WHITE);
SetPlayerHealth(playerid, 100);
DestroyDynamic3DTextLabel(AODLabel[playerid]);
DestroyDynamic3DTextLabel(AODLabel2[playerid]);
TextDrawHideForPlayer(playerid, TextdrawAOD[playerid]);
format(string, sizeof(string), "[ADMIN]"COL_WHITE" %s is now Off Duty!", GetPlayerName(playerid));
SendClientMessageToAll(COLOR_ADMIN, string);
}
} else return ErrorMessages(playerid, 3);
return 1;
}
OnplayerSpawn tengo: Por si muere en algun caso se ponga su color de nuevo y bla bla
if(GetPVarInt(playerid, "AODMODE") == 1)
{
SetPlayerHealth(playerid, Math.Infinite());
SetPlayerColor(playerid, COLOR_ADMIN);
}
CMD:aod(playerid, params[]) { #pragma unused params new ARank[128], string[128] ; if(pInfo[playerid][AdminLevel] >= 1 || IsPlayerAdmin(playerid)) { if(GetPVarInt(playerid, "AODMODE") != 1) { if(IsPlayerAdmin(playerid)) { ARank = "Rcon Owner"; } else { switch(pInfo[playerid][AdminLevel]) { case 1: {ARank = "Beginner Admin";} case 2: {ARank = "Secretary";} case 3: {ARank = "Admin Instructor";} case 4: {ARank = "Director Admin";} case 5: {ARank = "Owner";} } } if(GetPVarInt(playerid, "PlayerLabel") == 1) { SetPVarInt(playerid, "PlayerLabel", 0); DestroyDynamic3DTextLabel(PlayerLabel[playerid]); DestroyDynamic3DTextLabel(AODLabel[playerid]); DestroyDynamic3DTextLabel(AODLabel2[playerid]); } SetPVarInt(playerid, "AODMODE", 1); SetPlayerHealth(playerid, Math.Infinite()); SetPlayerColor(playerid, COLOR_ADMIN); TextDrawShowForPlayer(playerid, TextdrawAOD[playerid]); AODLabel[playerid] = CreateDynamic3DTextLabel(ARank, COLOR_ADMIN, 0.0, 0.0, 0.0+0.3, 15.0, playerid, INVALID_VEHICLE_ID, 0, -1, -1); AODLabel2[playerid] = CreateDynamic3DTextLabel("Admin on Duty!", COLOR_ADMIN, 0.0, 0.0, 0.0+0.4, 15.0, playerid, INVALID_VEHICLE_ID, 0, -1, -1); format(string, sizeof(string), "[ADMIN]"COL_WHITE" %s is now On Duty!, use /ask to formulate any question", GetPlayerName(playerid)); SendClientMessageToAll(COLOR_ADMIN, string); } else if(GetPVarInt(playerid, "AODMODE") == 1) { SetPVarInt(playerid, "AODMODE", 0); SetPlayerColor(playerid, COLOR_WHITE); SetPlayerHealth(playerid, 100); DestroyDynamic3DTextLabel(AODLabel[playerid]); DestroyDynamic3DTextLabel(AODLabel2[playerid]); TextDrawHideForPlayer(playerid, TextdrawAOD[playerid]); format(string, sizeof(string), "[ADMIN]"COL_WHITE" %s is now Off Duty!", GetPlayerName(playerid)); SendClientMessageToAll(COLOR_ADMIN, string); } } else return ErrorMessages(playerid, 3); return 1; } |
CMD:label(playerid, params[])
{
new
msg[128],
string[128],
COLORL[32],
LCOLOR = COLOR_WHITE
;
if(GetPVarInt(playerid, "AODMODE") == 1) return ErrorMessages(playerid, 8);
if(pInfo[playerid][VipLevel] == 0 && pInfo[playerid][EXP] < 1000) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]"COL_WHITE" You need 1000 EXP or VIP to use this command");
if(sscanf(params, "s[128]", msg) && pInfo[playerid][VipLevel] == 0 ) return SendClientMessage(playerid, COLOR_ORANGE, "Usage:"COL_WHITE" /label [TEXT]");
else if(pInfo[playerid][VipLevel] >= 1)
{
if(sscanf(params, "s[128]s[32]", msg, COLORL))
{
SendClientMessage(playerid, COLOR_ORANGE, "Usage:"COL_WHITE" /label [TEXT][COLOR]");
SendClientMessage(playerid, COLOR_ORANGE, "[__________ COLOR LIST __________]");
SendClientMessage(playerid, -1, "{000000}Black"COL_WHITE"- ONLY VIP LEVEL 5");
SendClientMessage(playerid, -1, "{00ffe9}Aqua"COL_WHITE"- ONLY VIP LEVEL 5");
SendClientMessage(playerid, -1, "{ff007b}Pinkish"COL_WHITE"- ONLY VIP LEVEL 5");
SendClientMessage(playerid, -1, "{f9ed00}Yellow");
SendClientMessage(playerid, -1, "{00ff00}Green");
SendClientMessage(playerid, -1, "{0083ff}Blue");
SendClientMessage(playerid, -1, "{800080}Purple");
SendClientMessage(playerid, -1, "{FF0000}Red");
return SendClientMessage(playerid, -1, "{ff2a00}Orange");
}
}
if(pInfo[playerid][VipLevel] < 5 && !strcmp("Black", COLORL, true)) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]"COL_WHITE" You need VIP LEVEL 5 to use this colour");
if(pInfo[playerid][VipLevel] < 5 && !strcmp("Aqua", COLORL, true)) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]"COL_WHITE" You need VIP LEVEL 5 to use this colour");
if(pInfo[playerid][VipLevel] < 5 && !strcmp("Pinkish", COLORL, true)) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]"COL_WHITE" You need VIP LEVEL 5 to use this colour");
else if(!strcmp("Black", COLORL, true)) LCOLOR = 0x000000FF;
else if(!strcmp("Aqua", COLORL, true)) LCOLOR = 0x00ffe9FF;
else if(!strcmp("Pinkish", COLORL, true)) LCOLOR = 0xff007bFF;
else if(!strcmp("Yellow", COLORL, true)) LCOLOR = 0xf9ed00FF;
else if(!strcmp("Green", COLORL, true)) LCOLOR = 0x00ff00FF;
else if(!strcmp("Blue", COLORL, true)) LCOLOR = 0x0083ffFF;
else if(!strcmp("Purple", COLORL, true)) LCOLOR = 0x800080FF;
else if(!strcmp("Red", COLORL, true)) LCOLOR = 0xFF0000FF;
else if(!strcmp("Orange", COLORL, true)) LCOLOR = 0xff2a00FF;
format(string, sizeof(string), "%s", msg);
if(GetPVarInt(playerid, "PlayerLabel") != 1)
{
SetPVarInt(playerid, "PlayerLabel", 1);
PlayerLabel[playerid] = CreateDynamic3DTextLabel(string, LCOLOR, 0.0, 0.0, 0.0+0.4, 15.0, playerid, INVALID_VEHICLE_ID, 0, -1, -1);
SendClientMessage(playerid, COLOR_SERVER, "[LABEL]"COL_WHITE" It made you the label successfully");
}
else
{
UpdateDynamic3DTextLabelText(PlayerLabel[playerid], LCOLOR, string);
format(string, sizeof(string), "[LABEL]"COL_WHITE" You have changed your label to %s", msg);
SendClientMessage(playerid, COLOR_SERVER, string);
}
return 1;
}