Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Dinamican Stan Sistem
- Credits: Maki187 (Marko_Dimitrijevic) - izrada cele FS
- CuervO_NegrO - prema njegovoj komandi napravljena je i ovde za postavljanje stana
- |=============[v0.1 - 15.2.2012 - 3.3.2012]============|
- Izrada cele FS(sa pauzama)
- Komande: /pstan(rcon) | /astan (rcon) | /editcenu (rcon) | /kupistan | /prodajstan |/slock | /sinfo | /stakemoney | /sputmoney | /shelp
- */
- #define FILTERSCRIPT
- #include <a_samp>
- #include <float>
- #include <zcmd>
- #include <foreach>
- #include <Dini>
- #include <Streamer>
- #include <sscanf2>
- #define ZUTA 0xDABB3EAA
- #define BELA 0xFFFFFFAA
- #define CRVENA 0xFF0000FF
- #define SIVA 0xBFC0C2FF
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- enum Stanovi
- {
- Float:sUlaZx,
- Float:sUlaZy,
- Float:sUlaZz,
- Float:sIzlaZx,
- Float:sIzlaZy,
- Float:sIzlaZz,
- sVlasnik[MAX_PLAYER_NAME],
- sOpis[MAX_PLAYER_NAME],
- sPosedovan,
- sPostavljen,
- sZakljucan,
- sNovac,
- sCena,
- sWorld,
- sPoruka,
- sInt
- };
- new StanInfo[500][Stanovi]; // broj 500 je max broj stanova, menjajte po zelji, al onda morate i dalje u skripti!
- new UsoUStan[MAX_PLAYERS]; // provera jel igrac u stanu
- new StanPickup[sizeof(StanInfo)]; // pickup od stana
- new Text3D:StanLabel[sizeof(StanInfo)]; // 3d text ispred vrata
- new imeigraca[MAX_PLAYER_NAME]; // za proveru imena igraca
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Dinamican Stan Sistem by: Maki187 (Marko_Dimitrijevic)");
- print(" Dinamican Stan Sistem v0.1");
- print(" Balkan Rising - www.balkan-rising.info");
- print(" Alfa Games - www.alfa-gaming.info");
- print(" -------------[PRIJATELJI]------------");
- print(" Bestbalkandj.com - www.bestbalkandj.com");
- print(" Serbian Warez - www.serbian-warez.in.rs");
- print(" Balkan Undergorund - www.bu-rp.info");
- print(" Egrotusi TDM - www.egrotusi-tdm.game.ba");
- print("--------------------------------------\n");
- UcitajStanove();
- new string[828];
- for(new s = 0; s < sizeof(StanInfo); s++)
- {
- if(StanInfo[s][sPostavljen] == 1)
- {
- if(StanInfo[s][sPosedovan] == 0)
- {
- format(string,sizeof(string),"{458B00}Na prodaju! \n {458B00}Adresa: {FFFFFF}%d \n {458B00}Cena: {FFFFFF}$%d \n {458B00}Opis: {FFFFFF}%s",StanInfo[s][sWorld], StanInfo[s][sCena],StanInfo[s][sOpis]);
- StanLabel[s] = Create3DTextLabel(string ,0x00FF00AA,StanInfo[s][sUlaZx], StanInfo[s][sUlaZy], StanInfo[s][sUlaZz],25, 0, 1);
- StanPickup[s] = CreateDynamicPickup(1273, 1, StanInfo[s][sUlaZx], StanInfo[s][sUlaZy], StanInfo[s][sUlaZz]);
- }
- if(StanInfo[s][sPosedovan] == 1)
- {
- format(string,sizeof(string)," {458B00}Vlasnik: {FFFFFF}%s \n {458B00}Adresa: {FFFFFF}%d \n {458B00}Opis: {FFFFFF}%s",StanInfo[s][sVlasnik],StanInfo[s][sWorld], StanInfo[s][sOpis]);
- StanLabel[s] = Create3DTextLabel(string ,0x00FFFFAA,StanInfo[s][sUlaZx], StanInfo[s][sUlaZy], StanInfo[s][sUlaZz],25, 0, 1);
- StanPickup[s] = CreateDynamicPickup(1273, 1, StanInfo[s][sUlaZx], StanInfo[s][sUlaZy], StanInfo[s][sUlaZz]);
- }
- }
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(PRESSED(KEY_SECONDARY_ATTACK))
- {
- for(new i = 0; i < sizeof(StanInfo); i++)
- {
- if (IsPlayerInRangeOfPoint(playerid, 3,StanInfo[i][sUlaZx], StanInfo[i][sUlaZy], StanInfo[i][sUlaZz]))
- {
- GetPlayerName(playerid, imeigraca, sizeof(imeigraca));
- if(StanInfo[i][sZakljucan] == 0|| strcmp(StanInfo[i][sVlasnik], imeigraca, false ) == 0)
- {
- SetPlayerInterior(playerid,StanInfo[i][sInt]); SetPlayerVirtualWorld(playerid,StanInfo[i][sWorld]);
- SetPlayerPos(playerid,StanInfo[i][sIzlaZx],StanInfo[i][sIzlaZy],StanInfo[i][sIzlaZz]);
- UsoUStan[playerid] = i;
- }
- else
- {
- GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
- return 1;
- }
- }
- }
- if(UsoUStan[playerid] != 501)
- {
- new i = UsoUStan[playerid];
- if(IsPlayerInRangeOfPoint(playerid, 3,StanInfo[i][sIzlaZx], StanInfo[i][sIzlaZy], StanInfo[i][sIzlaZz]))
- {
- SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid,0);
- SetPlayerPos(playerid,StanInfo[i][sUlaZx],StanInfo[i][sUlaZy],StanInfo[i][sUlaZz]);
- UsoUStan[playerid] = 501;
- return 1;
- }
- }
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- stock SacuvajStan(idstana)
- {
- new stan[64];
- format(stan, sizeof(stan),"Stanovi/%d.ini",idstana);
- if(dini_Exists(stan))
- {
- if(StanInfo[idstana][sPosedovan] >= 0)
- {
- dini_FloatSet(stan,"Ulaz_X",StanInfo[idstana][sUlaZx]);
- dini_FloatSet(stan,"Ulaz_Y",StanInfo[idstana][sUlaZy]);
- dini_FloatSet(stan,"Ulaz_Z",StanInfo[idstana][sUlaZz]);
- dini_FloatSet(stan,"Izlaz_X",StanInfo[idstana][sIzlaZx]);
- dini_FloatSet(stan,"Izlaz_Y",StanInfo[idstana][sIzlaZy]);
- dini_FloatSet(stan,"Izlaz_Z",StanInfo[idstana][sIzlaZz]);
- dini_Set(stan,"Vlasnik",StanInfo[idstana][sVlasnik]);
- dini_Set(stan,"Opis",StanInfo[idstana][sOpis]);
- dini_IntSet(stan,"Posedovan",StanInfo[idstana][sPosedovan]);
- dini_IntSet(stan,"Postavljen",StanInfo[idstana][sPostavljen]);
- dini_IntSet(stan,"Zakljucan",StanInfo[idstana][sZakljucan]);
- dini_IntSet(stan,"Novac",StanInfo[idstana][sNovac]);
- dini_IntSet(stan,"Cena",StanInfo[idstana][sCena]);
- dini_IntSet(stan,"World",StanInfo[idstana][sWorld]);
- dini_Set(stan,"Poruka",StanInfo[idstana][sPoruka]);
- dini_IntSet(stan,"Int",StanInfo[idstana][sInt]);
- }
- }
- }
- stock UcitajStanove()
- {
- new stan[128];
- for(new idstana = 0; idstana < sizeof(StanInfo) ; idstana++)
- {
- format(stan, sizeof(stan),"Stanovi/%d.ini", idstana);
- if(dini_Exists(stan))
- {
- StanInfo[idstana][sUlaZx] = dini_Float(stan,"Ulaz_X");
- StanInfo[idstana][sUlaZy] = dini_Float(stan,"Ulaz_Y");
- StanInfo[idstana][sUlaZz] = dini_Float(stan,"Ulaz_Z");
- StanInfo[idstana][sIzlaZx] = dini_Float(stan,"Izlaz_X");
- StanInfo[idstana][sIzlaZy] = dini_Float(stan,"Izlaz_Y");
- StanInfo[idstana][sIzlaZz] = dini_Float(stan,"Izlaz_Z");
- strmid(StanInfo[idstana][sVlasnik], dini_Get(stan,"Vlasnik"), 0, strlen(dini_Get(stan,"Vlasnik")), 255);
- strmid(StanInfo[idstana][sPoruka], dini_Get(stan,"Poruka"), 0, strlen(dini_Get(stan,"Poruka")), 255);
- strmid(StanInfo[idstana][sOpis], dini_Get(stan,"Opis"), 0, strlen(dini_Get(stan,"Opis")), 255);
- StanInfo[idstana][sPosedovan] = dini_Int(stan,"Posedovan");
- StanInfo[idstana][sPostavljen] = dini_Int(stan,"Postavljen");
- StanInfo[idstana][sZakljucan] = dini_Int(stan,"Zakljucan");
- StanInfo[idstana][sNovac] = dini_Int(stan,"Novac");
- StanInfo[idstana][sCena] = dini_Int(stan,"Cena");
- StanInfo[idstana][sWorld] = dini_Int(stan,"World");
- StanInfo[idstana][sInt] = dini_Int(stan,"Int");
- }
- }
- return 1;
- }
- stock LabelIPickup(idstana)
- {
- new string[828];
- if(StanInfo[idstana][sPosedovan] == 0)
- {
- Delete3DTextLabel(StanLabel[idstana]);
- format(string,sizeof(string),"{458B00}Na prodaju! \n {458B00}Adresa:{FFFFFF} %d \n {458B00}Cena:{FFFFFF} $%d \n{458B00}Opis: {FFFFFF}%s",StanInfo[idstana][sWorld], StanInfo[idstana][sCena],StanInfo[idstana][sOpis]);
- StanLabel[idstana] = Create3DTextLabel(string ,0x00FF00AA,StanInfo[idstana][sUlaZx], StanInfo[idstana][sUlaZy], StanInfo[idstana][sUlaZz],25, 0, 1);
- }
- if(StanInfo[idstana][sPosedovan] == 1)
- {
- Delete3DTextLabel(StanLabel[idstana]);
- format(string,sizeof(string),"{458B00}Vlasnik: {FFFFFF}%s \n {458B00}Adresa: {FFFFFF}%d \n {458B00}Opis: {FFFFFF}%s",StanInfo[idstana][sVlasnik],StanInfo[idstana][sWorld], StanInfo[idstana][sOpis]);
- StanLabel[idstana] = Create3DTextLabel(string ,0x00FFFFAA,StanInfo[idstana][sUlaZx], StanInfo[idstana][sUlaZy], StanInfo[idstana][sUlaZz],25, 0, 1);
- }
- DestroyDynamicPickup(StanPickup[idstana]);
- StanPickup[idstana] = CreateDynamicPickup(1273, 1, StanInfo[idstana][sUlaZx], StanInfo[idstana][sUlaZy], StanInfo[idstana][sUlaZz]);
- }
- //======================[CMD]==============================
- CMD:slock(playerid, params[]) // zakljucavanje i otkljucavanje stana
- {
- for(new i = 0; i < sizeof(StanInfo); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3,StanInfo[i][sUlaZx], StanInfo[i][sUlaZy], StanInfo[i][sUlaZz]) && UsoUStan[playerid] == 501)
- {
- GetPlayerName(playerid, imeigraca, sizeof(imeigraca));
- if(strcmp(StanInfo[i][sVlasnik], imeigraca, false ) == 0)
- {
- if(StanInfo[i][sZakljucan] == 1)
- {
- GameTextForPlayer(playerid, "~g~Otkljucano", 5000, 6);
- StanInfo[i][sZakljucan] = 0;
- return 1;
- }
- if(StanInfo[i][sZakljucan] == 0)
- {
- GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 6);
- StanInfo[i][sZakljucan] = 1;
- return 1;
- }
- }
- }
- if(IsPlayerInRangeOfPoint(playerid, 25,StanInfo[i][sIzlaZx], StanInfo[i][sIzlaZy], StanInfo[i][sIzlaZz]))
- {
- if(IsPlayerInRangeOfPoint(playerid, 3,StanInfo[i][sIzlaZx], StanInfo[i][sIzlaZy], StanInfo[i][sIzlaZz]) && UsoUStan[playerid] != 501)
- {
- GetPlayerName(playerid, imeigraca, sizeof(imeigraca));
- if(strcmp(StanInfo[i][sVlasnik], imeigraca, false ) == 0)
- {
- if(StanInfo[i][sZakljucan] == 1)
- {
- GameTextForPlayer(playerid, "~g~Otkljucano", 5000, 6);
- StanInfo[i][sZakljucan] = 0;
- return 1;
- }
- if(StanInfo[i][sZakljucan] == 0)
- {
- GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 6);
- StanInfo[i][sZakljucan] = 1;
- return 1;
- }
- }
- }
- else { SendClientMessage(playerid, BELA,"Nisi ispred vrata svog stana!"); return 1; }
- }
- }
- return 1;
- }
- CMD:kupistan(playerid, params[]) // kupovina stana
- {
- for(new i = 0; i < sizeof(StanInfo); i++)
- {
- GetPlayerName(playerid, imeigraca, sizeof(imeigraca));
- if(strcmp(StanInfo[i][sVlasnik], imeigraca, false ) == 0)
- {
- SendClientMessage(playerid, BELA, "Vec imas stan!");
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3,StanInfo[i][sUlaZx], StanInfo[i][sUlaZy], StanInfo[i][sUlaZz]) && StanInfo[i][sPosedovan] == 0)
- {
- if(GetPlayerMoney(playerid) > StanInfo[i][sCena])
- {
- strmid(StanInfo[i][sVlasnik], imeigraca, 0, strlen(imeigraca), 255);
- StanInfo[i][sPosedovan] = 1;
- GivePlayerMoney(playerid,-StanInfo[i][sCena]);
- SendClientMessage(playerid, BELA, "Cestitamo na kupovini novog stana, kucajte /shelp da saznate komande!");
- strmid(StanInfo[i][sVlasnik], imeigraca, 0, strlen(imeigraca), 255);
- LabelIPickup(i);
- SacuvajStan(i);
- return 1;
- }
- else { SendClientMessage(playerid, SIVA, "Nemas dovoljno para!"); return 1; }
- }
- }
- return 1;
- }
- CMD:prodajstan(playerid, params[]) // prodaja stana
- {
- for(new i = 0; i < sizeof(StanInfo); i++)
- {
- GetPlayerName(playerid, imeigraca, sizeof(imeigraca));
- if(IsPlayerInRangeOfPoint(playerid, 3,StanInfo[i][sUlaZx], StanInfo[i][sUlaZy], StanInfo[i][sUlaZz]) && strcmp(StanInfo[i][sVlasnik], imeigraca, false ) == 0)
- {
- strmid(StanInfo[i][sVlasnik], "Drzava", 0, strlen("Drzava"), 255);
- StanInfo[i][sPosedovan] = 0;
- StanInfo[i][sZakljucan] = 1;
- GivePlayerMoney(playerid,StanInfo[i][sCena]);
- SendClientMessage(playerid, BELA, "Uspesno ste prodali stan!");
- LabelIPickup(i);
- SacuvajStan(i);
- return 1;
- }
- }
- return 1;
- }
- CMD:sputmoney(playerid, params[])// stavljate novac u stan
- {
- new novac; new string[500];
- if(sscanf(params, "i", novac))
- {
- SendClientMessage(playerid, BELA, "/sputmoney [novac]");
- return 1;
- }
- for(new i = 0; i < sizeof(StanInfo); i++)
- {
- GetPlayerName(playerid, imeigraca, sizeof(imeigraca));
- if(IsPlayerInRangeOfPoint(playerid, 10,StanInfo[i][sIzlaZx], StanInfo[i][sIzlaZy], StanInfo[i][sIzlaZz]) && strcmp(StanInfo[i][sVlasnik], imeigraca, false ) == 0)
- {
- if(GetPlayerMoney(playerid) >= novac)
- {
- StanInfo[i][sNovac] += novac;
- GivePlayerMoney(playerid,-novac);
- format(string, sizeof(string), "Stavio si %d $ u sef, pa sad ima: %d", novac, StanInfo[i][sNovac]);
- SendClientMessage(playerid, ZUTA, string);
- SacuvajStan(i);
- return 1;
- }
- else { SendClientMessage(playerid,SIVA,"Nemas dovoljno para!"); return 1; }
- }
- }
- return 1;
- }
- CMD:stakemoney(playerid, params[]) // uzimate novac iz stana
- {
- new novac; new string[500];
- if(sscanf(params, "i", novac))
- {
- SendClientMessage(playerid, BELA, "/stakemoney [novac]");
- return 1;
- }
- for(new i = 0; i < sizeof(StanInfo); i++)
- {
- GetPlayerName(playerid, imeigraca, sizeof(imeigraca));
- if(IsPlayerInRangeOfPoint(playerid, 10,StanInfo[i][sIzlaZx], StanInfo[i][sIzlaZy], StanInfo[i][sIzlaZz]) && strcmp(StanInfo[i][sVlasnik], imeigraca, false ) == 0)
- {
- if(StanInfo[i][sNovac] >= novac)
- {
- StanInfo[i][sNovac] -= novac;
- GivePlayerMoney(playerid,novac);
- format(string, sizeof(string), "Uzeo si %d $ iz sefa, ostalo je jos: %d $", novac, StanInfo[i][sNovac]);
- SendClientMessage(playerid, ZUTA, string);
- SacuvajStan(i);
- return 1;
- }
- else { SendClientMessage(playerid,SIVA,"Nemas dovoljno para!"); return 1; }
- }
- }
- return 1;
- }
- CMD:sinfo(playerid, params[]) // prikazuje stanje kuce
- {
- for(new i = 0; i < sizeof(StanInfo); i++)
- {
- new string[500];
- if(IsPlayerInRangeOfPoint(playerid, 10,StanInfo[i][sIzlaZx], StanInfo[i][sIzlaZy], StanInfo[i][sIzlaZz]) && strcmp(StanInfo[i][sVlasnik], imeigraca, false ) == 0)
- {
- SendClientMessage(playerid, ZUTA, "|========================================|");
- if(StanInfo[i][sZakljucan] == 1)
- {
- SendClientMessage(playerid, BELA, "Zakljucan: Da");
- }
- if(StanInfo[i][sZakljucan] == 0)
- {
- SendClientMessage(playerid, BELA, "Zakljucan: Ne");
- }
- format(string, sizeof(string), "Novac u sefu: %d $", StanInfo[i][sNovac]);
- SendClientMessage(playerid, BELA, string);
- format(string, sizeof(string), "Vrednost kuce: %d $", StanInfo[i][sCena]);
- SendClientMessage(playerid, BELA, string);
- SendClientMessage(playerid, ZUTA, "|========================================|");
- return 1;
- }
- }
- return 1;
- }
- CMD:shelp(playerid, params[]) // prikazuje listu komandi igracu
- {
- if(IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, BELA, "Admin Komande: /pstan | /astan");
- }
- SendClientMessage(playerid, BELA, "Komande: /kupistan | /prodajstan | /sinfo | /slock | /sputmoney | /stakemoney");
- return 1;
- }
- //======================[ADMIN CMD]=============================
- CMD:pstan(playerid, params[]) // postavlja stan IG (SAMO RCON)
- {
- if(IsPlayerAdmin(playerid))
- {
- new Float:X, Float:Y, Float:Z; new string[828]; new stanid = 0;
- GetPlayerPos(playerid, X,Y,Z);
- for(new s = 0; s < sizeof(StanInfo); s++)
- {
- if(StanInfo[s][sPostavljen] == 1)
- {
- stanid = s + 1;
- }
- }
- format(string, sizeof(string),"Stanovi/%d.ini",stanid);
- dini_Create(string);
- StanInfo[stanid][sUlaZx] = X;
- StanInfo[stanid][sUlaZy] = Y;
- StanInfo[stanid][sUlaZz] = Z;
- StanInfo[stanid][sIzlaZx] = 225.756989;
- StanInfo[stanid][sIzlaZy] = 1240.000000;
- StanInfo[stanid][sIzlaZz] = 1082.149902;
- StanInfo[stanid][sCena] = 38000;
- StanInfo[stanid][sWorld] = stanid;
- StanInfo[stanid][sInt] = 2;
- StanInfo[stanid][sPosedovan] = 0;
- StanInfo[stanid][sPostavljen] = 1;
- StanInfo[stanid][sZakljucan] = 1;
- strmid(StanInfo[stanid][sVlasnik],"Drzava",0,strlen("Drzava"),255);
- strmid(StanInfo[stanid][sOpis], "Stan", 0, strlen("Stan"), 255);
- strmid(StanInfo[stanid][sPoruka],"Na prodaju",0,strlen("Na prodaju"),255);
- format(string,sizeof(string),"{458B00}Na prodaju! \n {458B00}Adresa: {FFFFFF}%d \n {458B00}Cena: {FFFFFF}%d $ \n {458B00}Opis: {FFFFFF}%s",StanInfo[stanid][sWorld], StanInfo[stanid][sCena],StanInfo[stanid][sOpis]);
- StanLabel[stanid] = Create3DTextLabel(string ,0x00FF00AA,X,Y,Z,25, 0, 1);
- StanPickup[stanid] = CreateDynamicPickup(1273, 1, StanInfo[stanid][sUlaZx], StanInfo[stanid][sUlaZy], StanInfo[stanid][sUlaZz]);
- format(string, sizeof(string),"Napravio si stan ID: %d",stanid);
- SendClientMessage(playerid, CRVENA, string);
- LabelIPickup(stanid);
- StanInfo[stanid][sInt]=2;
- SacuvajStan(stanid);
- return 1;
- }
- else { SendClientMessage(playerid,SIVA,"Nisi Admin(RCON)!!"); return 1; }
- }
- CMD:unististan(playerid, params[]) // unistavanje stana (SAMO RCON)
- {
- if(IsPlayerAdmin(playerid))
- {
- new stanid;
- if(sscanf(params, "i", stanid))
- {
- SendClientMessage(playerid, BELA, "/unististan [id stana]");
- return 1;
- }
- if(StanInfo[stanid][sPostavljen] == 1)
- {
- new string[500]; new fajl[500];
- StanInfo[stanid][sPostavljen] = 0;
- Delete3DTextLabel(StanLabel[stanid]);
- DestroyDynamicPickup(StanPickup[stanid]);
- SacuvajStan(stanid);
- format(string, sizeof(string),"Unistio si stan id: %d",stanid);
- SendClientMessage(playerid, CRVENA, string);
- format(fajl,sizeof(fajl),"Stanovi/%d.ini",stanid);
- fremove(fajl);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, SIVA, "Taj stan nepostoji!");
- return 1;
- }
- }
- else { SendClientMessage(playerid,SIVA,"Nisi Admin(RCON)!!"); return 1; }
- }
- CMD:astan(playerid, params[]) // teleportuje u stan (SAMO RCON)
- {
- if(IsPlayerAdmin(playerid))
- {
- new stan;
- if(sscanf(params, "i", stan))
- {
- SendClientMessage(playerid, BELA, "/astan [id stana]");
- return 1;
- }
- SetPlayerInterior(playerid,StanInfo[stan][sInt]);
- SetPlayerVirtualWorld(playerid,StanInfo[stan][sWorld]);
- SetPlayerPos(playerid,StanInfo[stan][sIzlaZx],StanInfo[stan][sIzlaZy],StanInfo[stan][sIzlaZz]);
- UsoUStan[playerid] = stan;
- return 1;
- }
- else { SendClientMessage(playerid,SIVA,"Nisi Admin(RCON)!!"); return 1; }
- }
- CMD:editcenu(playerid, params[]) // editovanje cene stana (SAMO RCON)
- {
- if(IsPlayerAdmin(playerid))
- {
- new cena;
- if(sscanf(params, "i", cena))
- {
- SendClientMessage(playerid, BELA, "/editcenu [cena stana]");
- return 1;
- }
- for(new i = 0; i < sizeof(StanInfo); i++)
- {
- new string[500];
- if(IsPlayerInRangeOfPoint(playerid, 2,StanInfo[i][sUlaZx], StanInfo[i][sUlaZy], StanInfo[i][sUlaZz]))
- {
- StanInfo[i][sCena] = cena;
- format(string, sizeof(string), "Promenio si cenu kuce ID: %d u %d $", i, cena);
- SendClientMessage(playerid, BELA, string);
- LabelIPickup(i);
- SacuvajStan(i);
- }
- }
- return 1;
- }
- else { SendClientMessage(playerid,SIVA,"Nisi Admin(RCON)!!"); return 1; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement