[HelpPls] iam need make command for admin name /duty
#1

[HelpPls] iam need make command for admin name /duty for make to on duty admin and need color for admin pls help
Reply
#2

In top
pawn Код:
new adminduty[MAX_PLAYERS];
new string[128];
command

pawn Код:
CMD:adminduty(playerid, params[])
{
if(adminduty[playerid] == 0)
{
adminduty[playerid] = 1;
SetPlayerColor(playerid, YOU COLOR);
new name[MAX_PLAYERS_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now on adminduty!",name);
SendClientMessageToAll(-1, string);
}
else
{
adminduty[playerid] = 0;
SetPlayerColor(playerid, YOU COLOR);
new name[MAX_PLAYERS_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now off adminduty!",name);
SendClientMessageToAll(-1, string);
}
return 1;
}
Reply
#3

man how i can set this code in gamemode or i can't
Reply
#4

At the very bottom of your gamemode, put this:

pawn Код:
new adminduty[MAX_PLAYERS];
new string[128];

CMD:adminduty(playerid, params[])
{
if(adminduty[playerid] == 0)
{
adminduty[playerid] = 1;
SetPlayerColor(playerid, YOU COLOR);
new name[MAX_PLAYERS_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now on adminduty!",name);
SendClientMessageToAll(-1, string);
}
else
{
adminduty[playerid] = 0;
SetPlayerColor(playerid, YOU COLOR);
new name[MAX_PLAYERS_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now off adminduty!",name);
SendClientMessageToAll(-1, string);
}
return 1;
}
Reply
#5

man he get error for add it can you join my computer and make it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)