21.07.2018, 18:56
Код:
COMMAND:makevip(playerid,params[]) { if(IgracInfo[playerid][iAdmin]<1338)return Greska(playerid,"Niste autorizirani da biste koristili ovu komandu - nemate administrator level."); new id,level; if(sscanf(params,"ii",id,level))return Koristenje(playerid,"/makeVip [ID igraca] [Level Vipa 0-6]"); if(!JelMoguce(id))return Greska(playerid,"Nepravilno upisan ID igraca / ili igrac nije logiran"); if(level<0||level>7)return Greska(playerid,"Pogresan upis Vip levela,0-6."); NapisiLog(""LOG_DIR"AMakeVip.log","/makevip","Admin:%s,Vip:%s,Lvl:%d",Ime(playerid),Ime(id),level); if(level==0) { if(IgracInfo[id][iVip]==0)return Koristenje(playerid,"/makeVip [ID igraca] [Level Vipa 0-6]"); format(ServerString,sizeof(ServerString),SRV_WARN"%s je dobio status Vipa (0) od strane %s - smjena",Ime(id),Ime(playerid)); PorukaTimu(COLOR_LIGHTRED,ServerString); new slot=IgracInfo[id][iVipID]; Vip_Brisanje(slot); IgracInfo[id][iVip]=0; IgracInfo[id][iVipID]=0; IgracInfo[id][iVipLoz]=123; IRacun_Sacuvaj(id); format(ServerString,sizeof(ServerString),SRV_WARN"Dobio si status Vipa (0) od strane %s.",Ime(playerid)); SendClientMessage(id,COLOR_LIGHTRED,ServerString); return 1; } if(IgracInfo[id][iVip]!=0) { format(ServerString,sizeof(ServerString),SRV_WARN"%s je dobio status Vipa (%d) od strane %s - promjena",Ime(id),level,Ime(playerid)); PorukaTimu(COLOR_LIGHTRED,ServerString); new vID=IgracInfo[id][iVipID]; IgracInfo[id][iVip]=level; IRacun_Sacuvaj(id); VipInfo[vID][vLevel]=level; Vip_Sacuvaj(vID); format(ServerString,sizeof(ServerString),SRV_WARN"Dobio si status Vipa (%d) od strane %s. - promjena",level,Ime(playerid)); SendClientMessage(id,COLOR_LIGHTRED,ServerString); } else { if(SljedeciVip(MAX_VIPOVA)==-1) return Greska(playerid,"Prekoracen limit Vipova..."); format(ServerString,sizeof(ServerString),SRV_WARN"%s je dobio status Vipa (%d) od strane %s - novi",Ime(id),level,Ime(playerid)); PorukaTimu(COLOR_LIGHTRED,ServerString); new vID=SljedeciVip(ServerInfo[sMaxVipova]); IgracInfo[id][iVipID]=vID; VipInfo[vID][rID]=IgracInfo[id][iRID]; VipInfo[vID][vLevel]=level; format(VipInfo[vID][vIme],24,Ime(id)); format(VipInfo[vID][vPostavio],24,Ime(playerid)); VPostavljen_Postavi(vID); VZadnjiLogin_Postavi(vID); Vip_Sacuvaj(vID); IgracInfo[id][iVip]=level; IgracInfo[id][iVipLoz]=696969; IRacun_Sacuvaj(id); ServerInfo[sVipova]++; format(ServerString,sizeof(ServerString),SRV_WARN"Dobio si status Vipa (%d,slot:%d) od strane %s",level,IgracInfo[id][iVipID],Ime(playerid)); SendClientMessage(id,COLOR_LIGHTRED,ServerString); format(ServerString,sizeof(ServerString),SRV_WARN"Vasa Vip Lozinka je: (%d) -> bez zagrada, slikajte ovo ili zapisite.",IgracInfo[id][iVipLoz]); SendClientMessage(id,COLOR_LIGHTRED,ServerString); SendClientMessage(id,COLOR_LIGHTRED,SRV_WARN"Trenutno za Vipove ne radi provjera kod logina,ali kad se postavi da znate defaultnu svoju lozinku!"); } return 1; }