13.08.2012, 16:58
Cambia esto:
// Comando:
-
Por esto:
Avнsame si te ha funcionado
// Comando:
Код:
if(strcmp(cmd, "/onduty", true) == 0) { if(PlayerInfo[playerid][admin] == 2 || PlayerInfo[playerid][admin] == 3 || PlayerInfo[playerid][admin] == 4 || PlayerInfo[playerid][admin] == 5) { new Adminname[MAX_PLAYER_NAME], string1[256], string2[256]; GetPlayerName(playerid, Adminname, sizeof(Adminname)); if (Duty[playerid] == 1) { format(string1, sizeof(string1), "El Administrador %s ya no esta disponible para atender tus dudas.", Adminname); SendClientMessageToAll(Rojo,string1); Duty[playerid] == 0; ForceClassSelection(playerid); SetPlayerHealth(playerid,0); } else { format(string2, sizeof(string2), "El Administrador %s esta listo para contestar tus dudas y reportes.", Adminname); SendClientMessageToAll(Verde,string2); Duty[playerid] == 1; SetPlayerHealth(playerid,100000); SetPlayerColor(playerid,0xFF0000C8); SetPlayerSkin(playerid,217); } } return 1; }
Por esto:
pawn Код:
if(strcmp(cmd, "/onduty", true) == 0)
{
new AdminStringDuty[300];
if(Info[playerid][Admin] >= 1)
{
if(Duty[playerid] == 0)
{
Duty[playerid] = 1;
format(AdminStringDuty, sizeof(AdminStringDuty), "El Administrador %s estб disponible para atender tus dudas.", GetPlayerName(playerid));
SendClientMessageToAll(Verde,AdminStringDuty);
SetPlayerHealth(playerid,100000);
SetPlayerColor(playerid,0xFF0000C8);
SetPlayerSkin(playerid,217);
return 1;
}
if(Duty[playerid] == 1)
{
Duty[playerid] = 0;
format(AdminStringDuty, sizeof(AdminStringDuty),"El Administrador %s ya no estб disponible para atender tus dudas.", GetPlayerName(playerid));
SendClientMessageToAll(Rojo, AdminStringDuty);
ForceClassSelection(playerid);
SetPlayerHealth(playerid,100);
return 1;
}
} else SendClientMessageEx(playerid, COLOR_GRAD2, "USE: (/a)dmin [Admin Chat]");
return 1;
}