/makeleader

Započeo Joca200, Jun 17, 2018, 20:05:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): uÄ'em na srv i kucam /makeleader ono standard id igraca i org sve nap kako treba i server pada u tom trenutku znaci pada odma
Dio skripte: [ pawn ]YCMD:makeleader(playerid, params[],help)
{
#pragma unused help
if(UlogovanProvera[playerid] == 0) return Error(playerid, "Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pAdmin] < 4) return Error(playerid, "Niste ovlasceni!");
if(PlayerInfo[playerid][pZaduzenLider] == 0) return Error(playerid, "Vi niste zaduzeni za ovu funciju");
new target, factionid, string[126];
if(AdminDuty[playerid] == 0) return Error(playerid, "Morate biti na admin duznosti!");
if(sscanf(params, "ud", target, factionid))
{
Cmd(playerid, "/makeleader (playerid) (orgid)");
SCM(playerid, -1, "1: Police Department | 2: Federal Bureau of Investigation | 3: La Cosa Nostra | 4: Russian Mafia | 5: Yakuza");
SCM(playerid, -1, "6: Grove Street Family | 7: Ballas | 8: AMKBike | 9: News");
return true;
}
if(factionid < 0 || factionid > 9) return Error(playerid, "Ne mozete ici ispod 0 i vise od 9!");
if(!IsPlayerConnected(target)) return Error(playerid, "Pogresan ID (Nije Online)!");
if(factionid == PlayerInfo[target][pLider]) return Error(playerid, "Taj igrac je vec lider te organizacije!");
if(factionid == 0)
{
PlayerInfo[target][pLider] = 0;
PlayerInfo[target][pClan] = 0;
PlayerInfo[target][pRank] = 0;
PlayerInfo[target][pSkin] = 60;
SetPlayerSkin(target,PlayerInfo[target][pSkin]);
SCMF(playerid,-1,""COL_BE"[BC] "BELA"Admin %s vam je skinuo lidera organizacije!",GetName(playerid));
format(string, sizeof(string), ""COL_BE"[BC] "BELA"Skinuli ste lidera igracu %s!",GetName(target));
SCM(playerid, -1, string);
format(string, sizeof(string), ""ZUTA"[ADMIN] Admin %s je skinuo lidera organizacije %s-u.",GetName(playerid), GetName(target));
SendAdminMessage(-1, string);
return true;
}
PlayerInfo[target][pLider] = factionid; PlayerInfo[target][pClan] = factionid; PlayerInfo[target][pRank] = 6;
if(factionid == 1) { PlayerInfo[target][pSkin] = 283; new text[64]; format(text,64,"%s",GetName(target)); new File:log; log = fopen("Lideri/1.txt", io_write); fwrite(log, text);fclose(log); } // LAPD
else if(factionid == 2) { PlayerInfo[target][pSkin] = 286; new text[64]; format(text,64,"%s",GetName(target)); new File:log; log = fopen("Lideri/2.txt", io_write); fwrite(log, text);fclose(log); } // FBI
else if(factionid == 3) { PlayerInfo[target][pSkin] = 126; new text[64]; format(text,64,"%s",GetName(target)); new File:log; log = fopen("Lideri/3.txt", io_write); fwrite(log, text);fclose(log); } // LA COSA NOSTRA
else if(factionid == 4) { PlayerInfo[target][pSkin] = 113; new text[64]; format(text,64,"%s",GetName(target)); new File:log; log = fopen("Lideri/4.txt", io_write); fwrite(log, text);fclose(log); } // RUSSIAN MAFIA
else if(factionid == 5) { PlayerInfo[target][pSkin] = 221; new text[64]; format(text,64,"%s",GetName(target)); new File:log; log = fopen("Lideri/5.txt", io_write); fwrite(log, text);fclose(log); } // Yakuza
else if(factionid == 6) { PlayerInfo[target][pSkin] = 271; new text[64]; format(text,64,"%s",GetName(target)); new File:log; log = fopen("Lideri/6.txt", io_write); fwrite(log, text);fclose(log); } // GROVE STREET FAMILY
else if(factionid == 7) { PlayerInfo[target][pSkin] = 296; new text[64]; format(text,64,"%s",GetName(target)); new File:log; log = fopen("Lideri/7.txt", io_write); fwrite(log, text);fclose(log); } // BALLAS
else if(factionid == 8) { PlayerInfo[target][pSkin] = 123; new text[64]; format(text,64,"%s",GetName(target)); new File:log; log = fopen("Lideri/8.txt", io_write); fwrite(log, text);fclose(log); } // AMKBike
else if(factionid == 9) { PlayerInfo[target][pSkin] = 295; new text[64]; format(text,64,"%s",GetName(target)); new File:log; log = fopen("Lideri/9.txt", io_write); fwrite(log, text);fclose(log); } // NEWS
SetPlayerSkin(target, PlayerInfo[target][pSkin]);
SCMF(playerid,-1,""COL_BE"[BC] "BELA"Admin %s vam je dao lidera organizacije %s!",GetName(playerid),ImeOrganizacije(factionid));
format(string, sizeof(string), ""COL_BE"[BC] "BELA"Dali ste lidera igracu %s!",GetName(target));
SCM(target, -1, string);
format(string, sizeof(string), ""ZUTA"[ADMIN] Admin %s je dao lidera %s-u organizacije %s.",GetName(playerid), GetName(target), ImeOrganizacije(factionid));
SendAdminMessage(-1, string);
PlayerTextDrawSetPreviewModel(target, INFO[5][target], PlayerInfo[target][pSkin]);
PlayerTextDrawShow(target, INFO[5][target]);
return true;
}[ /pawn ]
Poslednja Izmena: Jun 25, 2018, 17:09:42 POSLE PODNE od Bašovski

Aj ovo sve lepo ubacu u #kod i posalji ponovo ali sumnjam da se tu nalazi ista al ajd

Da li imas folder Lideri u scriptfiles .. Ako nemas to bi mogao biti jedan razlog zbog rusenja servera.

Ovo return true; zamjeni sa return 1;

i skini ovaj plugin vidi sta ce ti ispisati

http://forum.sa-mp.com/showthread.php?t=249226