Dio skripte:
YCMD:makesupporter(playerid, params[], help)
{
#pragma unused help
if(PI < 6) return Error(playerid, "Nisi ovlascen za ovu komandu!");
{
new id, lvl, slot;
if(sscanf(params, "uli", id, lvl, slot))
{
Cmd(playerid, "makesupporter (playerid) (level) (slot)");
return 1;
}
if(id == IPI) return Error(playerid, "Taj igrac nije na serveru!");
if(slot < 0 || slot > 4) return Error(playerid, "Slot ne moze biti manji od 1 ili veci od 4!");
if(slot < 1 && lvl > 0) return Error(playerid, "Slot ne moze biti manji od 1 ili veci od 4!");
if(lvl < 0 || lvl > 3) return Error(playerid, "Ne moze vise od 3 ili manje od 0.");
if(lvl == 0)
{
if(PI > 0)
{
new File: log, supp, text;
format(supp, 128, "Supporteri/%d.txt", PI);
format(text, 64, "Niko");
log = fopen(supp, io_write);
fwrite(log, text);
fclose(log);
}
new string;
PI = lvl;
SetPlayerSkin(id, 26);
PI = 26;
PI = 0;
Info(id, "Skinuta vam je pozicija Supportera od stane Admina");
format(string,sizeof(string), ""ZUTA"[SUPP DOWN] Owner %s je skinuo Admin igracu %s", GetName(playerid), GetName(id));
SendAdminMessage(-1,string);
SavePlayer(id);
SetPlayerSpecialAction(id, SPECIAL_ACTION_NONE);
}
else if(lvl == 1 || lvl == 2 || lvl == 3)
{
new File:log, supp, text, string;
format(supp, 128, "Supporteri/%d.txt", slot);
format(text, 64, "%s", GetName(id));
log = fopen( supp, io_write );
fwrite(log, text);
fclose(log);
SetPlayerSkin(id, 59);
PI = 59;
PI = lvl;
PI = slot;
Info(playerid, "Prolovisali ste igraca %s na Supp level %d, slot:%d", GetName(id), lvl, slot);
format(string,sizeof(string), ""COL_GX">>GeniusX<< "BELA"Owner %s je postavio igracu %s Supp level %d, Supp slot %d", GetName(playerid), GetName(id) , lvl, slot);
SendAdminMessage(-1,string);
new ssstring;
format(ssstring,sizeof(ssstring), "Owner %s | Igrac %s | Supp Level %d | Supp Slot %d", GetName(playerid), GetName(id), lvl, slot);
LogSave("Logs/MakeSupporter.log", ssstring);
new stris;
format(stris,sizeof(stris), ""BELA"Cestitamoa vam, postali se Supporter na GeniusX Gaming severu!\n Supporter level %d vam je dao Owner %s.\nSLOT: %d", lvl, GetName(playerid), slot);
SPD(id, DIALOG_OSTALOO, DSM, ""COL_GX"Welcome in >>GeniusX<< Staff", stris, "Izlaz", "");
SavePlayer(id);
}
}
return 1;
}
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
/Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/ULOmKSW