[POMOC]Komanda

Započeo Mr.GordoN, Januar 28, 2016, 19:12:43 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Detaljan opis problema: Radim gmod i imam problem sa komandom /lockacc kada je god unesem server padne
Skripta koju koristim:Licna
Neke slike/video/kod za lakse dobivanje pomoci (npr.slika server.cfg, server log ili slično)://

YCMD:lockacc(playerid,params[],help)
{
#pragma unused help
if(UlogovanIgrac[playerid] == 0 || PI[playerid][pReg] == 0) return Error(playerid, "Nisi ulogovan/a ili nisi registrovan/a!");
    if(PI[playerid][padmin] < 1 && ACCmd[playerid] == 1) return Error(playerid, "Komande mozete koristiti svake 2 sekunde!");
CmdProtect(playerid);
//if(!strcmp(GetNameEx(playerid), Owner_1, true) || !strcmp(GetNameEx(playerid), Owner_2, true) || !strcmp(GetNameEx(playerid), Director_1, true) || !strcmp(GetNameEx(playerid), Director_2, true) || !strcmp(GetNameEx(playerid), Director_3, true) || !strcmp(GetNameEx(playerid), Director_4, true) || !strcmp(GetNameEx(playerid), Director_5, true) || !strcmp(GetNameEx(playerid), Director_6, true) || !strcmp(GetNameEx(playerid), Head_ABS, true))
    if(UlogovanIgrac[playerid] == 1)
{
if(UlogovanIgrac[playerid] == 0) return Error(playerid, "Moras biti prijavljen!");
if(UlogovanIgrac[playerid] == 0) return Error(playerid, "Nisi ulogovan!");
new id, razlog[128], string[300];
if(sscanf(params,"us[128]",id,razlog)) return Cmd(playerid, "/lockacc (playerid) (razlog)");
else if(id == IPI) return Error(playerid, "Taj gradjanin ne postoji.");
new name[MPN];
GetPlayerName(id, name, sizeof(name));
if(!strcmp(name, Owner_1, true)) return Error(playerid, "Ne mozes njega.");
if(!strcmp(name, Owner_2, true)) return Error(playerid, "Ne mozes njega.");
    if(!strcmp(name, Director_1, true)) return Error(playerid, "Ne mozes njega.");
    if(!strcmp(name, Director_2, true)) return Error(playerid, "Ne mozes njega.");
    if(!strcmp(name, Director_3, true)) return Error(playerid, "Ne mozes njega.");
    if(!strcmp(name, Director_4, true)) return Error(playerid, "Ne mozes njega.");
    if(!strcmp(name, Director_5, true)) return Error(playerid, "Ne mozes njega.");
    if(!strcmp(name, Director_6, true)) return Error(playerid, "Ne mozes njemu!");
    if(PI[playerid][padmin] < 1) return Error(playerid, "Ne mozes to!");
    if(PI[id][pLevel] > 1 && PI[playerid][padmin] < 4) return Error(playerid, "Ne mozes veci level od 1!");
new imeid[MPN];
GetPlayerName(id, imeid, sizeof(imeid));
strreplace(imeid, '_', ' ');
format(string,300,"{FBE204}[{F81414}*{FBE204}] UG-AC // Admin %s je zakljucao account gradjaninu %s, razlog: %s!",GetName(playerid),imeid,razlog);
PAdm(ZUTA, string, 1);
format(string,300,"{F23A0D}LOCK: {FFFFFF}%s je zakljucan account od strane Admin-a, razlog: %s", imeid, razlog);
SCMTA(SVETLOCRVENA, string);
new ddd[128];
GetPlayerName(id, ddd, sizeof(ddd));
new banfile[64];
format(banfile,64,LOCK_FOLDER,ddd);
new File:ban = fopen(banfile, io_write);
fwrite(ban, "|== ONLINE LOCK ==|\n");
new var[64];
format(var,64,"| Admin = %s |\n", GetName(playerid));
fwrite(ban,var);
new var1[128];
format(var1,128,"| Razlog = %s |\n", razlog);
fwrite(ban,var1);
fclose(ban);
lz_Kick(id);
}
return true;
}

Ne znam zašto pada, ali zašto koristiš 3 puta istu varijablu, sa istim rezultatom ?