Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //NAPRAVIO:SANDMAN
- //=======samo da znate ovo je napravljeno od aHouse sistema,nema level i nisam siguran da ce raditi
- #include <a_samp>
- #include <dudb>
- #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- #define MAX_STANOVA 50
- #define MAX_RENTCOST 1000
- #define MIN_RENTCOST 500
- #define MAX_BUY_CARS 8
- #define CAR_DELIVER_TIME 1
- new STAN_STATS = 0;
- #define Cost_Admiral 50000
- //----------------------------
- //----------------------------
- #define c_y 0xFFFF00AA
- #define c_r 0xAA3333AA
- new HousePickup[MAX_STANOVA];
- new playerinterior[MAX_PLAYERS]=-1;
- new inhousepickup[MAX_PLAYERS];
- new playericonhouse[MAX_PLAYERS];
- new Float:stanx, Float:stany, Float:stanz;
- new housemapicon[MAX_PLAYERS];
- new playerworld[MAX_PLAYERS];
- forward rentfee();
- enum StanInfo
- {
- Name[24],
- Renter[24],
- Rentable,
- Rentcost,
- Cost,
- Sell,
- Interior,
- Virtualworld,
- Locked,
- Float:InteriorX,
- Float:InteriorY,
- Float:InteriorZ,
- Float:iconx,
- Float:icony,
- Float:iconz,
- Rentfee
- }
- new hInfo[MAX_STANOVA][StanInfo];
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Stanovi");
- print("--------------------------------------\n");
- AddStan(0, 1188.9827,-1017.8866,36.2344, 328.1465, 1478.4457,1084.4375, 0, 0, 15, 0);
- SetTimer("rentfee", 1*60*60*1000, 1);//1 hour
- SetTimer("newcar", CAR_DELIVER_TIME*60*10*1000,1);//1 hour
- return 0;
- }
- public OnFilterScriptExit()
- {
- for(new i=0;i<MAX_STANOVA;i++)
- {
- DestroyPickup(HousePickup[i]);
- }
- return 0;
- }
- #else
- #endif
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(kupistan,3,cmdtext);
- dcmd(prodajstan,4,cmdtext);
- dcmd(ulaz,10,cmdtext);
- dcmd(izlaz,10,cmdtext);
- dcmd(zakljucaj,4,cmdtext);
- dcmd(otkljucaj,6,cmdtext);
- dcmd(home,4,cmdtext);
- dcmd(stan,5,cmdtext);
- dcmd(stanstats,10,cmdtext);
- dcmd(getrent,7,cmdtext);
- dcmd(payrent,7,cmdtext);
- return 0;
- }
- AddStan(stanid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
- {
- new house[256];
- format(house, sizeof(house), "Stanovi/stanid%d",stanid);
- if(!dini_Exists(house))
- {
- dini_Create(house);
- format(hInfo[stanid][Name], 24, "STAN NA PRODAJU");
- dini_Set(house, "Name", "Prodaje se");
- format(hInfo[stanid][Renter], 24, "");
- dini_Set(house, "Renter", "ForRent");
- hInfo[stanid][Rentable] = 0;
- dini_IntSet(house, "Rentable", 0);
- hInfo[stanid][Rentcost] = 0;
- dini_IntSet(house, "Rentcost", 0);
- hInfo[stanid][Cost] = Costa;
- dini_IntSet(house, "Cijena", Costa);
- hInfo[stanid][Sell] = Sella;
- dini_IntSet(house, "Prodaja", Sella);
- hInfo[stanid][Interior] = Interiora;
- dini_IntSet(house, "Interior", Interiora);
- dini_IntSet(house, "Virtualworld", virtualworld);
- hInfo[stanid][Virtualworld] = virtualworld;
- hInfo[stanid][Locked] = 1;
- dini_IntSet(house, "Locked", 1);
- hInfo[stanid][InteriorX] = interiorX;
- hInfo[stanid][InteriorY] = interiorY;
- hInfo[stanid][InteriorZ] = interiorZ;
- dini_FloatSet(house, "X", interiorX);
- dini_FloatSet(house, "Y", interiorY);
- dini_FloatSet(house, "Z", interiorZ);
- dini_IntSet(house, "RentPay", 0);
- dini_IntSet(house, "RentGet", 0);
- print("-");
- print("--------------House Created--------------");
- printf("- stanid: %d", stanid);
- printf("- Buy Cost: %d", Costa);
- printf("- Sell Cost: %d", Sella);
- printf("- Interior: %d", Interiora);
- printf("- VirtualWorld: %d", virtualworld);
- print("-----------------------------------------");
- print("-");
- }
- else
- {
- format(hInfo[stanid][Name], 24, dini_Get(house, "Ime"));
- format(hInfo[stanid][Renter], 24, dini_Get(house, "Renter"));
- hInfo[stanid][Rentable] = dini_Int(house, "Rentable");
- hInfo[stanid][Rentcost] = dini_Int(house, "Rentcost");
- hInfo[stanid][Cost] = dini_Int(house, "Cost");
- hInfo[stanid][Sell] = dini_Int(house, "Sell");
- hInfo[stanid][Interior] = dini_Int(house, "Interior");
- hInfo[stanid][Locked] = dini_Int(house, "Locked");
- hInfo[stanid][InteriorX] = dini_Float(house, "X");
- hInfo[stanid][InteriorY] = dini_Float(house, "Y");
- hInfo[stanid][InteriorZ] = dini_Float(house, "Z");
- hInfo[stanid][Virtualworld] = dini_Int(house, "Virtualworld");
- }
- hInfo[stanid][iconx]=iconX;
- hInfo[stanid][icony]=iconY;
- hInfo[stanid][iconz]=iconZ;
- format(house, sizeof(house), "Stanovi/stanid%d",stanid);
- if(strcmp(hInfo[playericonhouse[stanid]][Name],"Na prodaju",true)==0)
- {
- HousePickup[stanid] = CreatePickup(1273, 23, iconX, iconY, iconZ);//not bought
- }
- else
- {
- HousePickup[stanid] = CreatePickup(1272,23, iconX, iconY, iconZ);//bought
- }
- }
- stock SpawnPlayerAtHouse(playerid)
- {
- new str1[256],pname[24],str[256];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(str1, sizeof(str1), "Stanovi/Users/%s", udb_encode(pname));
- if (dini_Exists(str1))
- {
- if(dini_Int(str1,"stanid")!=-255)
- {
- new Float:x,Float:y,Float:z;
- str = dini_Get(str1,"SpawnInt");
- SetPlayerInterior(playerid, strval(str));
- playerinterior[playerid] = strval(str);
- x = dini_Float(str1,"SpawnX");
- y = dini_Float(str1,"SpawnY");
- z = dini_Float(str1,"SpawnZ");
- SetPlayerPos(playerid, x, y, z);
- }
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SpawnPlayerAtHouse(playerid);
- }
- GetStanoviStats(playerid, pickupid)
- {
- for(new i=0;i<MAX_STANOVA;i++)
- {
- if(pickupid==HousePickup[i])
- {
- if(STAN_STATS==0)
- {
- new str2[256];
- format(str2, sizeof(str2), "Owned by: %s", hInfo[i][Name]);
- SendClientMessage(playerid, c_y, str2);
- if(strcmp(hInfo[i][Renter],"ForRent",true))
- {
- format(str2, sizeof(str2), "Rented by: %s", hInfo[i][Renter]);
- SendClientMessage(playerid, c_y, str2);
- }
- format(str2,sizeof(str2),"Cost: %i",hInfo[i][Cost]);
- SendClientMessage(playerid, c_y, str2);
- }
- inhousepickup[playerid] = GetTickCount();
- playericonhouse[playerid] = i;
- }
- }
- }
- dcmd_prodajstan(playerid,params[])
- {
- #pragma unused params
- new timestamp = GetTickCount();
- if(timestamp - inhousepickup[playerid] > 5000)
- {
- SendClientMessage(playerid, c_r, "Nisi na ikoni od stana!");
- return 1;
- }
- new str[255],str1[256],pname[24];
- GetPlayerName(playerid, pname, 24);
- format(str1, sizeof(str1), "Stanovi/stanid%d", playericonhouse[playerid]);
- if (strcmp(hInfo[playericonhouse[playerid]][Name],pname,false)) return SendClientMessage(playerid, c_r, "This house isn't yours!");
- SendClientMessage(playerid, c_y, "You have sold your house!");
- format(str, sizeof(str), "%s has sold stanid 0",pname);
- print(str);
- GivePlayerMoney(playerid, hInfo[playericonhouse[playerid]][Sell]);
- dini_Set(str1, "Name", "ForSale");
- hInfo[playericonhouse[playerid]][Locked] = dini_IntSet(str1,"Locked",1);
- format(hInfo[playericonhouse[playerid]][Name],255,"Na prodaju");
- format(str1, sizeof(str1), "Stanovi/Users/%s", udb_encode(pname));
- if (!dini_Exists(str1)) dini_Create(str1);
- dini_IntSet(str1, "stanid", -255);
- DestroyPickup(HousePickup[playericonhouse[playerid]]);
- HousePickup[playericonhouse[playerid]] = CreatePickup(1273, 23, hInfo[playericonhouse[playerid]][iconx], hInfo[playericonhouse[playerid]][icony], hInfo[playericonhouse[playerid]][iconz]);
- RemovePlayerMapIcon(playerid, housemapicon[playerid]);
- return 1;
- }
- dcmd_kupistan(playerid,params[])
- {
- #pragma unused params
- new timestamp = GetTickCount();
- if(timestamp - inhousepickup[playerid] > 5000)
- {
- SendClientMessage(playerid, c_r, "You are not in a house icon!");
- return 1;
- }
- new str[255],str1[255],pname[24];
- GetPlayerName(playerid, pname, 24);
- format(str1, sizeof(str1), "Stanovi/Users/%s", udb_encode(pname));
- if(dini_Exists(str1))
- {
- if (dini_Int(str1, "stanid")!=-255) return SendClientMessage(playerid, c_r, "Mozes kupiti samo jedan stan!");
- }
- format(str1, sizeof(str1), "Stanovi/stanid%d", playericonhouse[playerid]);
- if (strcmp(hInfo[playericonhouse[playerid]][Name],"ForSale",true)) return SendClientMessage(playerid, c_r, "This house isn't for sale!");
- if(GetPlayerMoney(playerid)<hInfo[playericonhouse[playerid]][Cost]) return SendClientMessage(playerid, c_r, "Not enough money!");
- SendClientMessage(playerid, c_y, "You have bought the house!");
- format(str, sizeof(str), "%s has bought stanid 0",pname);
- print(str);
- GivePlayerMoney(playerid, -hInfo[playericonhouse[playerid]][Cost]);
- dini_Set(str1, "Name", pname);
- hInfo[playericonhouse[playerid]][Name]=pname;
- hInfo[playericonhouse[playerid]][Locked] = dini_IntSet(str1,"Locked",0);
- format(str1, sizeof(str1), "Stanovi/Users/%s", udb_encode(pname));
- if (!dini_Exists(str1)) dini_Create(str1);
- new Float:sy, Float:sx, Float:sz;
- dini_IntSet(str1, "stanid", playericonhouse[playerid]);
- if(!dini_Isset(str1,"Rentid"))
- {
- dini_IntSet(str1, "Rentid", -255);
- }
- GetPlayerPos(playerid, sx,sy,sz);
- dini_FloatSet(str1, "SpawnX", sx);
- dini_FloatSet(str1, "SpawnY", sy);
- dini_FloatSet(str1, "SpawnZ", sz);
- dini_IntSet(str1, "SpawnInt", GetPlayerInterior(playerid));
- DestroyPickup(HousePickup[playericonhouse[playerid]]);
- HousePickup[playericonhouse[playerid]] = CreatePickup(1272, 23, hInfo[playericonhouse[playerid]][iconx], hInfo[playericonhouse[playerid]][icony], hInfo[playericonhouse[playerid]][iconz]);
- return 1;
- }
- dcmd_zakljucaj(playerid,params[])
- {
- #pragma unused params
- new timestamp = GetTickCount();
- if(timestamp - inhousepickup[playerid] > 5000)
- {
- SendClientMessage(playerid, c_r, "You are not in a house icon!");
- return 1;
- }
- new str1[256],pname[24];
- GetPlayerName(playerid, pname, 24);
- format(str1, sizeof(str1), "Stanovi/stanid%d", playericonhouse[playerid]);
- if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0)
- {
- SendClientMessage(playerid, c_y, "Zakljucao si stan!");
- dini_IntSet(str1,"Locked",1);
- hInfo[playericonhouse[playerid]][Locked] = 1;
- }
- else if(strcmp(hInfo[playericonhouse[playerid]][Renter],pname,true)==0)
- {
- SendClientMessage(playerid, c_y, "Mozes zakljucati i imati samo jedan stan!");
- dini_IntSet(str1,"Locked",1);
- hInfo[playericonhouse[playerid]][Locked] = 1;
- }
- else
- {
- SendClientMessage(playerid, c_r, "This house isn't yours!");
- }
- return 1;
- }
- dcmd_otkljucaj(playerid,params[])
- {
- #pragma unused params
- new timestamp = GetTickCount();
- if(timestamp - inhousepickup[playerid] > 5000)
- {
- SendClientMessage(playerid, c_r, "You are not in a house icon!");
- return 1;
- }
- new str1[256],pname[24];
- GetPlayerName(playerid, pname, 24);
- format(str1, sizeof(str1), "Stanovi/stanid%d", playericonhouse[playerid]);
- if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0)
- {
- SendClientMessage(playerid, c_y, "You have unlocked your house!");
- dini_IntSet(str1,"Locked",0);
- hInfo[playericonhouse[playerid]][Locked] = 0;
- }
- else if(strcmp(hInfo[playericonhouse[playerid]][Renter],pname,true)==0)
- {
- SendClientMessage(playerid, c_y, "You have unlocked your house!");
- dini_IntSet(str1,"Locked",0);
- hInfo[playericonhouse[playerid]][Locked] = 0;
- }
- else
- {
- SendClientMessage(playerid, c_r, "This house isn't yours!");
- }
- return 1;
- }
- dcmd_ulaz(playerid,params[])
- {
- #pragma unused params
- new timestamp = GetTickCount();
- if(timestamp - inhousepickup[playerid] > 5000)
- {
- SendClientMessage(playerid, c_r, "Nisi na ikoni od stana!");
- return 1;
- }
- new str1[255],pname[24];
- GetPlayerPos(playerid, stanx, stany, stanz);
- format(str1, sizeof(str1), "Stanovi/stanid%d", playericonhouse[playerid]);
- GetPlayerName(playerid, pname, 24);
- if(hInfo[playericonhouse[playerid]][Locked]==1) return SendClientMessage(playerid, c_r, "Ovaj stan je zakljucan!");
- playerworld[playerid] = GetPlayerVirtualWorld(playerid);
- SendClientMessage(playerid, c_y, "Usao si u stan!");
- SetPlayerVirtualWorld(playerid, hInfo[playericonhouse[playerid]][Virtualworld]);
- SetPlayerInterior(playerid, hInfo[playericonhouse[playerid]][Interior]);
- SetPlayerPos(playerid, hInfo[playericonhouse[playerid]][InteriorX], hInfo[playericonhouse[playerid]][InteriorY], hInfo[playericonhouse[playerid]][InteriorZ]);
- playerinterior[playerid] = hInfo[playericonhouse[playerid]][Interior];
- return 1;
- }
- dcmd_izlaz(playerid,params[])
- {
- #pragma unused params
- if(GetPlayerInterior(playerid)==playerinterior[playerid])
- {
- SetPlayerPos(playerid, stanx, stany, stanz);
- SetPlayerInterior(playerid, playerworld[playerid]);
- }
- else
- {
- SendClientMessage(playerid, c_r, "Nisi usao u stan!");
- }
- return 1;
- }
- dcmd_home(playerid,params[])
- {
- #pragma unused params
- new str1[256],pname[24];
- GetPlayerName(playerid, pname, 24);
- format(str1, sizeof(str1), "Stanovi/Users/%s", udb_encode(pname));
- if(!dini_Exists(str1)) return SendClientMessage(playerid, c_r, "You don't own a house!");
- if(dini_Int(str1, "stanid")!=-255)
- {
- housemapicon[playerid] = SetPlayerMapIcon(playerid,31,hInfo[dini_Int(str1, "stanid")][iconx], hInfo[dini_Int(str1, "stanid")][icony], hInfo[dini_Int(str1, "stanid")][iconz],31,c_y);
- }
- else if (dini_Int(str1, "Rentid")!=-255)
- {
- housemapicon[playerid] = SetPlayerMapIcon(playerid,31,hInfo[dini_Int(str1, "Rentid")][iconx], hInfo[dini_Int(str1, "Rentid")][icony], hInfo[dini_Int(str1, "Rentid")][iconz],31,c_y);
- }
- else
- {
- SendClientMessage(playerid, c_r, "You don't own a house!");
- }
- return 1;
- }
- dcmd_stan(playerid,params[])
- {
- #pragma unused params
- SendClientMessage(playerid, c_y, "-------------");
- SendClientMessage(playerid, c_y, "STAN");
- SendClientMessage(playerid, c_y, "-------------");
- SendClientMessage(playerid, c_y, "/zakljucaj - Renter/Owner");
- SendClientMessage(playerid, c_y, "/otkljucaj - Renter/Owner");
- SendClientMessage(playerid, c_y, "-------------");
- return 1;
- }
- dcmd_stanstats(playerid,params[])
- {
- #pragma unused params
- new timestamp = GetTickCount();
- if(timestamp - inhousepickup[playerid] > 5000)
- {
- SendClientMessage(playerid, c_r, "You are not in a house icon!");
- return 1;
- }
- new str[256];
- format(str, sizeof(str), "Owner: %s", hInfo[playericonhouse[playerid]][Name]);
- SendClientMessage(playerid, c_y, str);
- format(str, sizeof(str), "Cost: $%d", hInfo[playericonhouse[playerid]][Cost]);
- SendClientMessage(playerid, c_y, str);
- format(str, sizeof(str), "Renter: %s", hInfo[playericonhouse[playerid]][Renter]);
- SendClientMessage(playerid, c_y, str);
- format(str, sizeof(str), "Rentcost: $%d / hour", hInfo[playericonhouse[playerid]][Rentcost]);
- SendClientMessage(playerid, c_y, str);
- return 1;
- }
- dcmd_getrent(playerid,params[])
- {
- #pragma unused params
- new timestamp = GetTickCount();
- if(timestamp - inhousepickup[playerid] > 5000)
- {
- SendClientMessage(playerid, c_r, "You are not in a house icon!");
- return 1;
- }
- new pname[24];
- GetPlayerName(playerid, pname, 24);
- if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0)
- {
- new str[255];
- SendClientMessage(playerid, c_y, "You collected the money of the renter!");
- format(str, sizeof(str), "Stanovi/stanid%d", playericonhouse[playerid]);
- GivePlayerMoney(playerid, dini_Int(str, "RentGet"));
- dini_IntSet(str, "RentGet", 0);
- }
- else
- {
- SendClientMessage(playerid, c_r, "This house isn't yours!");
- }
- return 1;
- }
- dcmd_payrent(playerid,params[])
- {
- #pragma unused params
- new timestamp = GetTickCount();
- if(timestamp - inhousepickup[playerid] > 5000)
- {
- SendClientMessage(playerid, c_r, "You are not in a house icon!");
- return 1;
- }
- new pname[24];
- GetPlayerName(playerid, pname, 24);
- if(strcmp(hInfo[playericonhouse[playerid]][Renter],pname,true)==0)
- {
- new str[255];
- format(str, sizeof(str), "Stanovi/stanid%d", playericonhouse[playerid]);
- if(GetPlayerMoney(playerid)<dini_Int(str, "RentPay")) return SendClientMessage(playerid, c_r, "You don't have enough money to pay the house owner!");
- SendClientMessage(playerid, c_y, "You have payed the money to the owner!");
- GivePlayerMoney(playerid, -dini_Int(str, "RentPay"));
- dini_IntSet(str, "RentPay", 0);
- }
- else
- {
- SendClientMessage(playerid, c_r, "You aren't renting this house!");
- }
- return 1;
- }
- public rentfee()
- {
- new str[255],str2[255],pname[24];
- for(new stanid=0;stanid<MAX_STANOVA;stanid++)
- {
- print("f");
- format(str, sizeof(str), "Stanovi/stanid%d", stanid);
- if(strcmp(hInfo[stanid][Renter], "ForRent", true))
- {
- for(new ii=0;ii<MAX_PLAYERS;ii++)
- {
- if(IsPlayerConnected(ii))
- {
- GetPlayerName(ii, pname, 24);
- if(strcmp(hInfo[stanid][Renter], pname, true)==0)
- {
- format(str2, sizeof(str2), "Rentao si ovaj stan!", hInfo[stanid][Rentcost]);
- SendClientMessage(ii, c_y, str2);
- dini_IntSet(str, "RentGet", dini_Int(str, "RentGet")+hInfo[stanid][Rentcost]);
- dini_IntSet(str, "RentPay", dini_Int(str, "RentPay")+hInfo[stanid][Rentcost]);
- hInfo[stanid][Rentfee]=1;
- }
- }
- }
- if(hInfo[stanid][Rentfee]==0)
- {
- if(strcmp(hInfo[stanid][Renter],"ForRent"))
- {
- dini_IntSet(str, "RentGet", dini_Int(str, "RentGet")+hInfo[stanid][Rentcost]);
- dini_IntSet(str, "RentPay", dini_Int(str, "RentPay")+hInfo[stanid][Rentcost]);
- }
- }
- hInfo[stanid][Rentfee]=0;
- }
- }
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- GetStanoviStats(playerid, pickupid);
- return 0;
- }
- stock sscanf(string[], format[], {Float,_}:...)
- {
- new
- formatPos = 0,
- stringPos = 0,
- paramPos = 2,
- paramCount = numargs();
- while (paramPos < paramCount && string[stringPos])
- {
- switch (format[formatPos++])
- {
- case '\0':
- {
- return 0;
- }
- case 'i', 'd':
- {
- new
- neg = 1,
- num = 0,
- ch = string[stringPos];
- if (ch == '-')
- {
- neg = -1;
- ch = string[++stringPos];
- }
- do
- {
- stringPos++;
- if (ch >= '0' && ch <= '9')
- {
- num = (num * 10) + (ch - '0');
- }
- else
- {
- return 1;
- }
- }
- while ((ch = string[stringPos]) && ch != ' ');
- setarg(paramPos, 0, num * neg);
- }
- case 'h', 'x':
- {
- new
- ch,
- num = 0;
- while ((ch = string[stringPos++]))
- {
- switch (ch)
- {
- case 'x', 'X':
- {
- num = 0;
- continue;
- }
- case '0' .. '9':
- {
- num = (num << 4) | (ch - '0');
- }
- case 'a' .. 'f':
- {
- num = (num << 4) | (ch - ('a' - 10));
- }
- case 'A' .. 'F':
- {
- num = (num << 4) | (ch - ('A' - 10));
- }
- case ' ':
- {
- break;
- }
- default:
- {
- return 1;
- }
- }
- }
- setarg(paramPos, 0, num);
- }
- case 'c':
- {
- setarg(paramPos, 0, string[stringPos++]);
- }
- case 'f':
- {
- new tmp[25];
- strmid(tmp, string, stringPos, stringPos+sizeof(tmp)-2);
- setarg(paramPos, 0, _:floatstr(tmp));
- }
- case 's', 'z':
- {
- new
- i = 0,
- ch;
- if (format[formatPos])
- {
- while ((ch = string[stringPos++]) && ch != ' ')
- {
- setarg(paramPos, i++, ch);
- }
- if (!i) return 1;
- }
- else
- {
- while ((ch = string[stringPos++]))
- {
- setarg(paramPos, i++, ch);
- }
- }
- stringPos--;
- setarg(paramPos, i, '\0');
- }
- default:
- {
- continue;
- }
- }
- while (string[stringPos] && string[stringPos] != ' ')
- {
- stringPos++;
- }
- while (string[stringPos] == ' ')
- {
- stringPos++;
- }
- paramPos++;
- }
- while (format[formatPos] == 'z') formatPos++;
- return format[formatPos];
- }
Advertisement
Add Comment
Please, Sign In to add comment