[POMOC]Komanda

Započeo Dzeki, Avgust 23, 2012, 23:07:18 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Moju
Detaljan opis problema:Neznam Gde Da Ubacim Komandu Ali Lepo
Dio skripte:   if(strcmp(cmd, "/napravi", true) == 0)
   {
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_RED," ");
SendClientMessage(playerid, COLOR_RED, "|---------------------------------------------------------------------|");
SendClientMessage(playerid, COLOR_GREY, "                           /napravi                               ");
SendClientMessage(playerid, COLOR_WHITE,"          ulicu  stan  kucu  vikendicu  biznis  garazu                      ");
SendClientMessage(playerid, COLOR_RED, "|---------------------------------------------------------------------|");
return 1;
}
if(strcmp(x_nr,"ulicu",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmp2[255];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi ulicu [cena] [lvl]");
return 1;
}
if(!strlen(tmp2))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi ulicu [cena] [lvl]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
new lolcina = 1;
for(new mica = 1; mica < sizeof(UlicaInfo); mica++)
{
new cena = strval(tmp);
new lvl =strval(tmp2);
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new stringers[600];
format(stringers, sizeof(stringers), "ulice/Ulica_%d.ini", mica);
if(lolcina == 0){return 1;}
if(!fexist(stringers))
{
lolcina = 0;
UlicaInfo[mica][uStanje]=0;
strmid(UlicaInfo[mica][uNaziv],"Nema", 0, strlen("Nema"), 255);
strmid(UlicaInfo[mica][uVlasnik],"Nema", 0, strlen("Nema"), 255);
UlicaInfo [mica][uLevel]=lvl;
UlicaInfo [mica][uKoradinataX]=x;
UlicaInfo [mica][uKoradinataY]=y;
UlicaInfo [mica][uKoradinataZ]=z;
UlicaInfo [mica][uPare]=cena;
dini_Create(stringers);
SaveUlice();
ulicatext(mica);
}
}
}
return 1;
}
if(strcmp(x_nr,"biznis",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmp2[255];
new tmp3[255];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
tmp3 = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi biznis [tip 1-8] [cena] [lvl]");
return 1;
}
if(!strlen(tmp2))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi biznis [tip 1-8] [cena] [lvl]");
return 1;
}
if(!strlen(tmp3))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi biznis [tip 1-8] [cena] [lvl]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
new tip = strval(tmp);
new cena = strval(tmp2);
new lvl =strval(tmp3);
if(tip < 1 || tip > 8){SendClientMessage(playerid, COLOR_GRAD2, "Nesme ispod 1 ili iznad 8!");return 1;}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new lolcina = 1;
for(new i = 1; i < sizeof(BizzInfo); i++)
{
if(lolcina == 0){return 1;}
new stringers[600];
format(stringers, sizeof(stringers), "biznisi/Biznis_%d.ini", i);
if(!fexist(stringers))
{
lolcina = 0;
BizzInfo[bOwned] = 0;
strmid(BizzInfo[bOwner],"Drzava", 0, strlen("Drzava"), 255);
BizzInfo[bLocked] = 0;
BizzInfo[bLevelNeeded] = lvl;
BizzInfo[bBuyPrice] = cena;
BizzInfo[bEntranceX] = x;
BizzInfo[bEntranceY] = y;
BizzInfo[bEntranceZ] = z;
BizzInfo[bEntranceCost]=0;
BizzInfo[bProducts]=400;
BizzInfo[bMaxProducts]=100000;
BizzInfo[bNeakt]=0;
BizzInfo[bPriceProd]=300;
BizzInfo[bTill]=0;
BizzInfo[bTip]=tip;
if(tip == 1)
{
BizzInfo[bExitX]=834.667419;
BizzInfo[bExitY]=7.469222;
BizzInfo[bExitZ]=1004.187011;
BizzInfo[bInterior]=3;
strmid(BizzInfo[bMessage],"Kladionica", 0, strlen("Kladionica"), 255);
strmid(BizzInfo[bExtortion],"Niko", 0, strlen("Niko"), 255);
SendClientMessage(playerid, COLOR_GRAD2, "Napravili ste Kladionicu!");
}
else if(tip == 2)
{
BizzInfo[bExitX]=412.046356;
BizzInfo[bExitY]=-54.446014;
BizzInfo[bExitZ]=1001.898437;
BizzInfo[bInterior]=12;
strmid(BizzInfo[bMessage],"Frizerski salon", 0, strlen("Frizerski salon"), 255);
strmid(BizzInfo[bExtortion],"Niko", 0, strlen("Niko"), 255);
SendClientMessage(playerid, COLOR_GRAD2, "Napravili ste Frizerski salon!");
}
else if(tip == 3)
{
BizzInfo[bExitX]=502.032623;
BizzInfo[bExitY]=-67.565780;
BizzInfo[bExitZ]=998.757812;
BizzInfo[bInterior]=11;
strmid(BizzInfo[bMessage],"Kafana", 0, strlen("Kafana"), 255);
strmid(BizzInfo[bExtortion],"Niko", 0, strlen("Niko"), 255);
SendClientMessage(playerid, COLOR_GRAD2, "Napravili ste Kafanu!");
}
else if(tip == 4)
{
BizzInfo[bExitX]=362.869812
BizzInfo[bExitY]=-75.167869
BizzInfo[bExitZ]=1001.507812;
BizzInfo[bInterior]=10;
strmid(BizzInfo[bMessage],"Burger", 0, strlen("Burger"), 255);
strmid(BizzInfo[bExtortion],"Niko", 0, strlen("Niko"), 255);
SendClientMessage(playerid, COLOR_GRAD2, "Napravili ste Burger!");
}
else if(tip == 5)
{
BizzInfo[bExitX]=364.975158;
BizzInfo[bExitY]=-11.844186;
BizzInfo[bExitZ]=1001.851562;
BizzInfo[bInterior]=9;
strmid(BizzInfo[bMessage],"Restoran", 0, strlen("Restoran"), 255);
strmid(BizzInfo[bExtortion],"Niko", 0, strlen("Niko"), 255);
SendClientMessage(playerid, COLOR_GRAD2, "Napravili ste Restoran!");
}
else if(tip == 6)
{
BizzInfo[bExitX]=206.966964;
BizzInfo[bExitY]=-140.376052;
BizzInfo[bExitZ]=1003.507812;
BizzInfo[bInterior]=3;
strmid(BizzInfo[bMessage],"Prodavnica Odece", 0, strlen("Prodavnica Odece"), 255);
strmid(BizzInfo[bExtortion],"Niko", 0, strlen("Niko"), 255);
SendClientMessage(playerid, COLOR_GRAD2, "Napravili ste Prodavnicu Odece!");
}
else if(tip == 7)
{
BizzInfo[bExitX]=315.851104;
BizzInfo[bExitY]=-143.663833;
BizzInfo[bExitZ]=999.601562;
BizzInfo[bInterior]=7;
strmid(BizzInfo[bMessage],"Prodavnica Oruzija", 0, strlen("Prodavnica Oruzija"), 255);
strmid(BizzInfo[bExtortion],"Niko", 0, strlen("Niko"), 255);
SendClientMessage(playerid, COLOR_GRAD2, "Napravili ste Prodavnicu Oruzija!");
}
else if(tip == 8)
{
BizzInfo[bExitX]=-25.858039;
BizzInfo[bExitY]=-188.246566;
BizzInfo[bExitZ]=1003.546875;
BizzInfo[bInterior]=17;
strmid(BizzInfo[bMessage],"24/7", 0, strlen("24/7"), 255);
strmid(BizzInfo[bExtortion],"Niko", 0, strlen("Niko"), 255);
SendClientMessage(playerid, COLOR_GRAD2, "Napravili ste 24/7!");
}
dini_Create(stringers);
SaveBIzs();
Biztekst(i);
}
}
}
return 1;
}
if(strcmp(x_nr,"kucu",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmp2[255];
new tmp3[255];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
tmp3 = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi kucu [tip 1-4] [cena] [lvl]");
return 1;
}
if(!strlen(tmp2))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi kucu [tip 1-4] [cena] [lvl]");
return 1;
}
if(!strlen(tmp3))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi kucu [tip 1-4] [cena] [lvl]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
new tip = strval(tmp);
new cena = strval(tmp2);
new lvl =strval(tmp3);
if(tip < 1 || tip > 4){SendClientMessage(playerid, COLOR_GRAD2, "Nesme ispod 1 ili iznad 4!");return 1;}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new lolcina = 1;
for(new i = 1; i < sizeof(HouseInfo); i++)
{
if(lolcina == 0){return 1;}
new stringers[600];
format(stringers, sizeof(stringers), "kuce/Kuca_%d.ini", i);
if(!fexist(stringers))
{
lolcina = 0;


HouseInfo[hOwned] = 0;
strmid(HouseInfo[hOwner],"Niko", 0, strlen("Niko"), 255);
HouseInfo[hLock] = 0;
HouseInfo[hLevel] = lvl;
HouseInfo[hValue] = cena;
HouseInfo[hEntrancex] = x;
HouseInfo[hEntrancey] = y;
HouseInfo[hEntrancez] = z;
HouseInfo[hRent] = 0;
HouseInfo[hTip]=tip;
HouseInfo[hRentabil]=0;
HouseInfo[hWorld]=i;
HouseInfo[hHealthx]=0;
HouseInfo[hHealthy]=0;
HouseInfo[hHealthz]=0;
HouseInfo[hVcol1] = -1;
HouseInfo[hVcol1] = -1;
HouseInfo[hVec] = 418;
if(tip == 1)
{
HouseInfo[hExitx]=223.15235900879;
HouseInfo[hExity]=1287.6987304688;
HouseInfo[hExitz]=1082.140625;
HouseInfo[hInt]=1;
HouseInfo[hRooms]=1;
strmid(HouseInfo[hDiscription],"Mala", 0, strlen("Mala"), 255);
}
else if(tip == 2)
{
HouseInfo[hExitx]=2233.8034667969;
HouseInfo[hExity]=-1114.8354492188;
HouseInfo[hExitz]=1050.8828125;
HouseInfo[hInt]=5;
HouseInfo[hRooms]=2;
strmid(HouseInfo[hDiscription],"Srednja", 0, strlen("Srednja"), 255);
}
else if(tip == 3)
{
HouseInfo[hExitx]=2196.1489257813;
HouseInfo[hExity]=-1204.3884277344;
HouseInfo[hExitz]=1049.0234375;
HouseInfo[hInt]=6;
HouseInfo[hRooms]=3;
strmid(HouseInfo[hDiscription],"Velika", 0, strlen("Velika"), 255);
}
else if(tip == 4)
{
HouseInfo[hExitx]=2365.3452148438;
HouseInfo[hExity]=-1135.0167236328;
HouseInfo[hExitz]=1050.875;
HouseInfo[hInt]=8;
HouseInfo[hRooms]=4;
strmid(HouseInfo[hDiscription],"Vila", 0, strlen("Vila"), 255);
}
dini_Create(stringers);
SaveKuce();
kucetexti(i);
}
}
}
return 1;
}
if(strcmp(x_nr,"vikendicu",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmp2[255];
new tmp3[255];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
tmp3 = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi vikendicu [tip 1-5] [cena] [lvl]");
return 1;
}
if(!strlen(tmp2))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi vikendicu [tip 1-5] [cena] [lvl]");
return 1;
}
if(!strlen(tmp3))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi vikendicu [tip 1-5] [cena] [lvl]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
new tip = strval(tmp);
new cena = strval(tmp2);
new lvl =strval(tmp3);
if(tip < 1 || tip > 5){SendClientMessage(playerid, COLOR_GRAD2, "Nesme ispod 1 ili iznad 5!");return 1;}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new lolcina = 1;
for(new i = 1; i < sizeof(VikendicaInfo); i++)
{
if(lolcina == 0){return 1;}
new stringers[600];
format(stringers, sizeof(stringers), "vikendice/Vikendica_%d.ini", i);
if(!fexist(stringers))
{
lolcina = 0;


VikendicaInfo[vStanje] = 0;
strmid(VikendicaInfo[vVlasnik],"Niko", 0, strlen("Niko"), 255);
VikendicaInfo[vLock] = 0;
VikendicaInfo[vLevel] = lvl;
VikendicaInfo[vCena] = cena;
VikendicaInfo[vPozicijaX] = x;
VikendicaInfo[vPozicijaY] = y;
VikendicaInfo[vPozicijaZ] = z;
VikendicaInfo[vNovac] = 0;
VikendicaInfo[vTip]=tip;
VikendicaInfo[vDroga]=0;
VikendicaInfo[vMateriali]=0;
if(tip == 1)
{
VikendicaInfo[viPozicijaX]=222.9534;
VikendicaInfo[viPozicijaY]=1287.7649;
VikendicaInfo[viPozicijaZ]=1082.1406;
VikendicaInfo[vInterier]=1;
}
else if(tip == 2)
{
VikendicaInfo[viPozicijaX]=261.0827;
VikendicaInfo[viPozicijaY]=1284.6899;
VikendicaInfo[viPozicijaZ]=1080.2578;
VikendicaInfo[vInterier]=4;
}
else if(tip == 3)
{
VikendicaInfo[viPozicijaX]=260.6734;
VikendicaInfo[viPozicijaY]=1237.7909;
VikendicaInfo[viPozicijaZ]=1084.2578;
VikendicaInfo[vInterier]=9;
}
else if(tip == 4)
{
VikendicaInfo[viPozicijaX]=376.7426;
VikendicaInfo[viPozicijaY]=1417.3226;
VikendicaInfo[viPozicijaZ]=1081.3281;
VikendicaInfo[vInterier]=15;
}
else if(tip == 5)
{
VikendicaInfo[viPozicijaX]=295.2874;
VikendicaInfo[viPozicijaY]=1473.2769;
VikendicaInfo[viPozicijaZ]=1080.2578;
VikendicaInfo[vInterier]=15;
}
dini_Create(stringers);
SaveVikendice(i);
vikendicatext(i);
}
}
}
return 1;
}
if(strcmp(x_nr,"stan",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmp2[255];
new tmp3[255];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
tmp3 = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi stan [tip 1-5] [cena] [lvl]");
return 1;
}
if(!strlen(tmp2))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi stan [tip 1-5] [cena] [lvl]");
return 1;
}
if(!strlen(tmp3))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi stan [tip 1-5] [cena] [lvl]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
new tip = strval(tmp);
new cena = strval(tmp2);
new lvl =strval(tmp3);
if(tip < 1 || tip > 5){SendClientMessage(playerid, COLOR_GRAD2, "Nesme ispod 1 ili iznad 5!");return 1;}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new lolcina = 1;
for(new i = 1; i < sizeof(StanInfo); i++)
{
if(lolcina == 0){return 1;}
new stringers[600];
format(stringers, sizeof(stringers), "stanovi/Stan_%d.ini", i);
if(!fexist(stringers))
{
lolcina = 0;
StanInfo[stStanje] = 0;
strmid(StanInfo[stVlasnik],"Niko", 0, strlen("Niko"), 255);
StanInfo[stLock] = 0;
StanInfo[stLevel] = lvl;
StanInfo[stCena] = cena;
StanInfo[stPozicijaX] = x;
StanInfo[stPozicijaY] = y;
StanInfo[stPozicijaZ] = z;
StanInfo[stNovac] = 0;
StanInfo[stTip]=tip;
if(tip == 1)
{
StanInfo[stiPozicijaX] = 225.756989;
StanInfo[stiPozicijaY] = 1240.000000;
StanInfo[stiPozicijaZ] = 1082.149902;
StanInfo[stInterier] = 2;
}
else if(tip == 2)
{
StanInfo[stiPozicijaX] = 260.983978;
StanInfo[stiPozicijaY] = 1286.549927;
StanInfo[stiPozicijaZ] = 1080.299927;
StanInfo[stInterier] = 4;
}
else if(tip == 3)
{
StanInfo[stiPozicijaX] = 385.803986;
StanInfo[stiPozicijaY] = 1471.769897;
StanInfo[stiPozicijaZ] = 1080.209961;
StanInfo[stInterier] = 15;
}
else if(tip == 4)
{
StanInfo[stiPozicijaX] = -42.4992;
StanInfo[stiPozicijaY] = 1406.0690;
StanInfo[stiPozicijaZ] = 1084.4297;
StanInfo[stInterier] = 8;
}
else if(tip == 5)
{
StanInfo[stiPozicijaX] = 446.5014;
StanInfo[stiPozicijaY] = 507.0295;
StanInfo[stiPozicijaZ] = 1001.4195;
StanInfo[stInterier] = 12;
}
dini_Create(stringers);
SaveStanove(i);
stanovitext(i);
}
}
}
return 1;
}
if(strcmp(x_nr,"garazu",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmp2[255];
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi garazu [cena] [lvl]");
return 1;
}
if(!strlen(tmp2))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /napravi garazu [cena] [lvl]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
new lolcina = 1;
for(new mica = 1; mica < sizeof(Garaza); mica++)
{
new cena = strval(tmp);
new lvl =strval(tmp2);
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new stringers[600];
format(stringers, sizeof(stringers), "garaze/Garaze_%d.ini", mica);
if(lolcina == 0){return 1;}
if(!fexist(stringers))
{
lolcina = 0;
Garaza[mica][gStanje]=0
strmid(Garaza[mica][gVlasnik],"Niko", 0, strlen("Niko"), 255);
Garaza[mica][gAuto]=0;
Garaza[mica][gSautoX]=0;
Garaza[mica][gSautoY]=0;
Garaza[mica][gSautoZ]=0;
Garaza[mica][gLevel]=lvl;
Garaza[mica][gAngel]=0;
Garaza[mica][gPozicijaX]=x;
Garaza[mica][gPozicijaY]=y;
Garaza[mica][gPozicijaZ]=z;
Garaza[mica][gCenaGaraze]=cena;
dini_Create(stringers);
dini_IntSet(stringers, "Stanje", Garaza[mica][gStanje]);
dini_Set(stringers, "Vlasnik",Garaza[mica][gVlasnik]);
dini_IntSet(stringers, "Auto", Garaza[mica][gAuto]);
dini_IntSet(stringers, "Level", Garaza[mica][gLevel]);
dini_FloatSet(stringers, "PozicijaX",Garaza[mica][gPozicijaX]);
dini_FloatSet(stringers, "PozicijaY",Garaza[mica][gPozicijaY]);
dini_FloatSet(stringers, "PozicijaZ",Garaza[mica][gPozicijaZ]);
dini_IntSet(stringers, "CenaGaraze",Garaza[mica][gCenaGaraze]);
SendClientMessage(playerid,COLOR_WHITE,"Napravili ste garazu!");
texticg(mica);
}
}
}
return 1;
}
return 1;
}
   if(strcmp(cmd, "/unisti", true) == 0)
   {
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_RED," ");
SendClientMessage(playerid, COLOR_RED, "|---------------------------------------------------------------------|");
SendClientMessage(playerid, COLOR_GREY, "                              /unisti                            ");
SendClientMessage(playerid, COLOR_WHITE,"        ulicu    stan    vikendicu    biznis    garazu   kucu                      ");
SendClientMessage(playerid, COLOR_RED, "|---------------------------------------------------------------------|");
return 1;
}
if(strcmp(x_nr,"ulicu",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
for(new i = 0; i < sizeof(UlicaInfo); i++)
{
if(PlayerToPoint(2.0, playerid,UlicaInfo[uKoradinataX],UlicaInfo[uKoradinataY],UlicaInfo[uKoradinataZ]))
{
SendClientMessage(playerid, COLOR_GRAD5,"Unistili ste garazu!");
DestroyPickup(ulicapic);
DestroyDynamic3DTextLabel(Text3D:ulicasale);

UlicaInfo[uStanje]=323;
strmid(UlicaInfo[uNaziv],"", 0, strlen(""), 255);
strmid(UlicaInfo[uVlasnik],"", 0, strlen(""), 255);
UlicaInfo [uLevel]=0;
UlicaInfo [uKoradinataX]=0;
UlicaInfo [uKoradinataY]=0;
UlicaInfo [uKoradinataZ]=0;
UlicaInfo [uPare]=0;

new FileName[ 23 ];
format(FileName, sizeof(FileName), "ulice/Ulica_%d.ini", i);
dini_Remove(FileName);
}
}
}
return 1;
}
if(strcmp(x_nr,"kucu",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if(PlayerToPoint(2.0, playerid,HouseInfo[hEntrancex],HouseInfo[hEntrancey],HouseInfo[hEntrancez]))
{
SendClientMessage(playerid, COLOR_GRAD5,"Unistili ste kucu!");
DestroyPickup(houspc);
DestroyDynamicMapIcon(housmark);
DestroyDynamic3DTextLabel(Text3D:housesale);
HouseInfo[hOwned]=323;
strmid(HouseInfo[hOwner],"", 0, strlen(""), 255);
HouseInfo[hLock] =0;
HouseInfo[hLevel] =0;
HouseInfo[hEntrancex]=0;
HouseInfo[hEntrancey]=0;
HouseInfo[hEntrancez]=0;
HouseInfo[hValue] =0;
new FileName[ 23 ];
format(FileName, sizeof(FileName),"kuce/Kuca_%d.ini", i);
dini_Remove(FileName);
}
}
}
return 1;
}
if(strcmp(x_nr,"biznis",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if(PlayerToPoint(2.0, playerid,BizzInfo[bEntranceX],BizzInfo[bEntranceY],BizzInfo[bEntranceZ]))
{
SendClientMessage(playerid, COLOR_GRAD5,"Unistili ste biznis!");
DestroyPickup(bizpic);
DestroyDynamicMapIcon(Bizonocud);
DestroyDynamic3DTextLabel(Text3D:bizsale);
BizzInfo[bOwned]=323;
strmid(BizzInfo[bOwner],"", 0, strlen(""), 255);
BizzInfo[bLocked] =0;
BizzInfo[bLevelNeeded] =0;
BizzInfo[bEntranceX]=0;
BizzInfo[bEntranceY]=0;
BizzInfo[bEntranceZ]=0;
BizzInfo[bBuyPrice] =0;
new FileName[ 23 ];
format(FileName, sizeof(FileName),"biznisi/Biznis_%d.ini", i);
dini_Remove(FileName);
}
}
}
return 1;
}
if(strcmp(x_nr,"vikendicu",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
for(new i = 0; i < sizeof(VikendicaInfo); i++)
{
if(PlayerToPoint(2.0, playerid,VikendicaInfo[vPozicijaX],VikendicaInfo[vPozicijaY],VikendicaInfo[vPozicijaZ]))
{
SendClientMessage(playerid, COLOR_GRAD5,"Unistili ste vikendicu!");
DestroyPickup(vikstan);
DestroyDynamic3DTextLabel(Text3D:vikendicasale);
VikendicaInfo[vStanje]=323;
strmid(VikendicaInfo[vVlasnik],"", 0, strlen(""), 255);
VikendicaInfo[vLock] =0;
VikendicaInfo[vLevel] =0;
VikendicaInfo[vPozicijaX]=0;
VikendicaInfo[vPozicijaY]=0;
VikendicaInfo[vPozicijaZ]=0;
VikendicaInfo[vCena] =0;
new FileName[ 23 ];
format(FileName, sizeof(FileName),"vikendice/Vikendica_%d.ini", i);
dini_Remove(FileName);
}
}
}
return 1;
}
if(strcmp(x_nr,"stan",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
for(new i = 0; i < sizeof(StanInfo); i++)
{
if(PlayerToPoint(2.0, playerid, StanInfo[stPozicijaX], StanInfo[stPozicijaY], StanInfo[stPozicijaZ]))
{
SendClientMessage(playerid, COLOR_GRAD5,"Unistili ste stan!");
DestroyPickup(picstan);
DestroyDynamic3DTextLabel(Text3D:stansale);
StanInfo[stStanje]=323;
strmid(StanInfo[stVlasnik],"", 0, strlen(""), 255);
StanInfo[stLock] =0;
StanInfo[stLevel] =0;
StanInfo[stPozicijaX]=0;
StanInfo[stPozicijaY]=0;
StanInfo[stPozicijaZ]=0;
StanInfo[stCena] =0;
new FileName[ 23 ];
format(FileName, sizeof(FileName), "stanovi/Stan_%d.ini", i);
dini_Remove(FileName);
}
}
}
return 1;
}
if(strcmp(x_nr,"garazu",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] <1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Niste ovlasceni da koristite ovu komandu!");
return 1;
}
for(new i = 0; i < sizeof(Garaza); i++)
{
if(PlayerToPoint(2.0, playerid, Garaza[gPozicijaX],Garaza[gPozicijaY],Garaza[gPozicijaZ]))
{
SendClientMessage(playerid, COLOR_GRAD5,"Unistili ste garazu!");
DestroyPickup(picgar);
DestroyDynamic3DTextLabel(Text3D:garazasale);
Garaza[gStanje]=323;
strmid(Garaza[gVlasnik],"", 0, strlen(""), 255);
Garaza[gAuto]=0;
Garaza[gLevel]=0;
Garaza[gPozicijaX]=0;
DestroyDynamicMapIcon(mapgarage);
Garaza[gPozicijaY]=0;
Garaza[gPozicijaZ]=0;
Garaza[gSautoX]=0;
Garaza[gSautoY]=0;
Garaza[gSautoZ]=0;
Garaza[gAngel]=0;
Garaza[gCenaGaraze]=0;
new FileName[ 23 ];
format(FileName, sizeof(FileName), "garaze/Garaze_%d.ini", i);
dini_Remove(FileName);
}
}
}
return 1;
}
return 1;
}
if(strcmp(cmd, "/kupivikendicu", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(50.0, playerid,0.0,0.0,0.0))
{
SendClientMessage(playerid, COLOR_WHITE, "Greska!");
return 1;
}
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new i = 0; i < sizeof(VikendicaInfo); i++)
{
if(PlayerToPoint(2.0, playerid, VikendicaInfo[vPozicijaX], VikendicaInfo[vPozicijaY],VikendicaInfo[vPozicijaZ]))
{
if(PlayerInfo[playerid][pLevel] < VikendicaInfo[vLevel])
{
new results[800];
format(results,sizeof(results),"Treba vam lvl %d da kupite stan!",VikendicaInfo[vLevel]);
SendClientMessage(playerid, COLOR_GRAD5,results);
return 1;
}
if(VikendicaInfo[vStanje] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "Ova vikendica vec ima vlasnika!");
return 1;
}
if(VikendicaInfo[vStanje]  != 0)
{
return 1;
}
if(PlayerInfo[playerid][pVikendica] != 999)
{
SendClientMessage(playerid, COLOR_WHITE, "Vec posjedujete vikendicu, kucajte /prodajvikendicu ako zelite da kupite ovu!");
return 1;
}
if(GetPlayerMoney(playerid) < VikendicaInfo[vCena])
{
SendClientMessage(playerid, COLOR_WHITE, "Nemate dovoljno novca!");
return 1;
}
PlayerInfo[playerid][pVikendica]=i;
VikendicaInfo[vStanje]=1;
strmid(VikendicaInfo[vVlasnik] , sendername, 0, strlen(sendername), 255);
SendClientMessage(playerid, COLOR_WHITE, "Cestitamo kupili ste vikendicu!(/vikendicahelp)");
GivePlayerMoney(playerid,-VikendicaInfo[vCena]);
new result[800];
new tril[300];
if(VikendicaInfo[vLock]==0){tril="Otkljucana";}
else if(VikendicaInfo[vLock]==1){tril="Zakljucana";}
format(result,sizeof(result),"{f7fc1c}Vlasnik {FFFFFF}%s\n{f7fc1c}Vikendica: {FFFFFF}%s\n{f7fc1c}Vrsta: {FFFFFF}%d\n{f7fc1c}Level: {FFFFFF}%d",VikendicaInfo[vVlasnik],tril,VikendicaInfo[vTip],VikendicaInfo[vLevel]);
UpdateDynamic3DTextLabelText(vikendicasale,0x00FFFFFF,result);
OnPlayerUpdateCustom(playerid);
SaveVikendice(i);
Neke slike/video za lakse dobivanje pomoci(neobavezno):