29.01.2013, 21:11
I use this command when some one go on admin mode , but the color of the player isn't changed
PHP код:
dcmd_adon(playerid,params[])
{
#pragma unused params
new string[128];
if(InAdminMode[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You are already in admin mode.");
return 1;
}
if(IsSpawned[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to go into admin mode.");
return 1;
}
for(new w=0; w<13; w++)
{
GetPlayerWeaponData(playerid,w,PlayerWeapon[playerid][w],PlayerAmmo[playerid][w]);
}
SendClientMessage(playerid,COLOR_ADMIN,"You are now in admin mode.");
format(string, sizeof(string),"[ADMIN MODE]Administrator %s(%d) has gone to Admin Mode ,Don't shoot him. or be Warned.",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_ADMIN,string);
InAdminMode[playerid] =1;
SetPlayerColor(playerid,COLOR_PINK);
return 1;
}