22.08.2016, 21:06
So I want to show a textdraw with Promoted to player who is promoted.. How I can do it?
And show his lvl of admin too.
Thanks.
And show his lvl of admin too.
Thanks.
pawn Код:
YCMD:makeadmin(playerid,params[],help)
{
if(PlayerInfo[playerid][pAdmin] >= 1337) //the one who typed it
{
new string[128],name[MAX_PLAYER_NAME],pID,Level;
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
if(sscanf(params,"ui",pID,Level)) return SendClientMessage(playerid,COLOR_GRAY,"/makeadmin <player> <level>");
if(IsPlayerConnected(pID))
{
if(PlayerInfo[pID][pAdmin] != Level) //why not let RCON admins have admin...?
{
PlayerInfo[pID][pAdmin] = Level;
format(string,sizeof(string),"** ADMIN PROMOTE: %s Is Now An Administrator Level %d!",name,Level);
SendClientMessageToAll(COLOR_RED,string);
TDEditor_PTD[pID][0] = CreatePlayerTextDraw(pID, 20.600341, 111.833343, "Promoted");
PlayerTextDrawLetterSize(pID, TDEditor_PTD[pID][0], 0.382196, 2.183332);
PlayerTextDrawTextSize(pID, TDEditor_PTD[pID][0], 124.000000, 0.000000);
PlayerTextDrawAlignment(pID, TDEditor_PTD[pID][0], 1);
PlayerTextDrawColor(pID, TDEditor_PTD[pID][0], -1);
PlayerTextDrawUseBox(pID, TDEditor_PTD[pID][0], 1);
PlayerTextDrawBoxColor(pID, TDEditor_PTD[pID][0], 255);
PlayerTextDrawSetShadow(pID, TDEditor_PTD[pID][0], 2);
PlayerTextDrawSetOutline(pID, TDEditor_PTD[pID][0], 0);
PlayerTextDrawBackgroundColor(pID, TDEditor_PTD[pID][0], 255);
PlayerTextDrawFont(pID, TDEditor_PTD[pID][0], 2);
PlayerTextDrawSetProportional(pID, TDEditor_PTD[pID][0], 1);
PlayerTextDrawSetShadow(pID, TDEditor_PTD[pID][0], 2);
}
else return SendClientMessage(playerid, COLOR_RED, "This player is already that level.");
}
else return SendClientMessage(playerid, COLOR_RED, "Invalid Player Specified.");
}
else return SendClientMessage(playerid, COLOR_RED, "You don't have access to this command.");
return 1;
}