23.07.2010, 17:07
Hi Johny_James,
A pretty simple function really
Hope this helped out!
Cheers,
TJ
A pretty simple function really
Код:
//Top of script
new AdminDuty[MAX_PLAYERS];
//OnPlayerConnect
AdminDuty[playerid] = 0;
//OnPlayerCommand
if(strcmp(cmdtext,"/adminduty",true) == 0)
{
if(IsPlayerAdmin(playerid))
{
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPlayerColor(playerid,CUSTOM_COLOR);
return 1;
}
else
{
AdminDuty[playerid] = 0;
SetPlayerColour(playerid,DEFAULT_COLOUR);
return 1;
}
}
else
{
SendClientMessage(playerid,COLOUR_WARNING,"You are not an administrator!");
return 1;
}
}
Cheers,
TJ

