25.05.2014, 04:15
Cuando quiero poner ese comando que es para sancionar, me dice que no estoy adminduty y si estoy, que tiene de malo para que pase eso?:
Код:
zcmd(san, playerid, params[]){ new string[120], time, giveplayerid, reason[64]; if(AdminDuty[playerid] == 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "[Bull's]: Necesitas estar OnDuty para usar este comando"); if(CommandSpamTimes[playerid] == 999){ format(string, sizeof(string), " %s fue baneado automбticamente, razуn: Flood Cmdґs", GetPlayerNameEx(playerid)); ABroadCast(COLOR_ORANGE,string,2); Log("logs/hackeraction.log", string); Info[playerid][pBannedZC] = 0; Kick(playerid); return 1; } if (Info[playerid][pAdminZC] < 1) return SendClientMessageEx(playerid, COLOR_GRAD2, "[ERROR]: No tienes autorizaciуn a usar este comando."); if (!sscanf(params, "dds[64]", giveplayerid, time, reason)){ if(IsPlayerConnected(giveplayerid)){ SetPVarInt(giveplayerid, "IsInArena", 0); SetPVarInt(giveplayerid, "ArenaMode", 0); CommandSpamTimes[playerid]++; CommandSpamUnmute[playerid] = 60; SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_FLOODPROTECTION); Info[giveplayerid][pJailAdmin] += 1; Info[giveplayerid][pJailed] = 1; PhoneOnline[giveplayerid] = 1; Info[giveplayerid][pJailTime] = time*60; ResetPlayerWeaponsEx(giveplayerid); new rand = random(sizeof(OOCJail)); LoadObjects(giveplayerid); SetPlayerPos(giveplayerid, OOCJail[rand][0], OOCJail[rand][1], OOCJail[rand][2]); SetPlayerToTeamColor(giveplayerid); SetPlayerInterior(giveplayerid, 0); SetPlayerVirtualWorld(giveplayerid, 1000); format(string, sizeof(string), "%s fue sancionado por %s", GetPlayerNameEx(giveplayerid), reason); BroadCast(COLOR_DIALOGO1, string); format(string, sizeof(string), "Te han sancionado, por %d minuto(s). Razуn: %s", time, reason); Log("logs/sancionar.log", string); format(string, sizeof(string), "Tiempo: %d minuto(s) - Jugador: %s", time, GetPlayerNameEx(giveplayerid)); ABroadCast(COLOR_AZULL,string,2); format(string, sizeof(string), "Tiempo: %d minuto(s)", time); SendClientMessageEx(giveplayerid, COLOR_GRAD2, string); StopAudioStreamForPlayer(giveplayerid); return 1; } else SendClientMessageEx(playerid, COLOR_GRAD2, "Esa ID es invбlida."); } else SendClientMessageEx(playerid, COLOR_GRAD2, "Utiliza: /sancionar [playerid] [minutos] [razуn]"); return 1; }