Advertisement
Guest User

Haussystem DYN 2.0.1 by Piet_Meier

a guest
Aug 24th, 2012
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 15.78 KB | None | 0 0
  1. /*
  2.  * Haus-System v2.0.1
  3.  * Copyright by Piet_Meier, 2012
  4.  */
  5.  
  6. #include <a_samp>//normal
  7. #include <ocmd>//commands
  8. #include <dini>//zum speichern
  9.  
  10. #define MAX_HOUSES 5//maximale häuser bis 100st wegen MAP ICONS.
  11. #define GRUN 0x00CA00FF
  12. #define ROT 0xFF1A24FF
  13. #define DIALOG_HAUS 13466//hier deine Freie Dialog ID eintragen
  14. #define SpielerName(%0) Player[%0][Name]
  15.  
  16. new Text3D:Label[MAX_HOUSES];//3D Label vom Haus
  17. new HousePickup[MAX_HOUSES];//Haus Pickup
  18.  
  19. enum HausEnum
  20. {
  21.     Float:infox,
  22.     Float:infoy,
  23.     Float:infoz,
  24.     Float:rx,
  25.     Float:ry,
  26.     Float:rz,
  27.     Float:hx,
  28.     Float:hy,
  29.     Float:hz,
  30.     int,
  31.     preis,
  32.     besitzer[MAX_PLAYER_NAME],
  33.     besetzt
  34. };
  35.  
  36. enum SpielerEnum
  37. {
  38.     Haus,//abfrage ob jemand in einem Haus ist
  39.     HausJA,//abfrage ob jemand ein haus besitzt
  40.     HausNR,//Nr des Hauses
  41.     Name[MAX_PLAYER_NAME]//Name des Spielers
  42. };
  43.  
  44. new h[MAX_HOUSES][HausEnum],
  45.     Player[MAX_PLAYERS][SpielerEnum];
  46. //Haus h=daten
  47.  
  48. public OnFilterScriptInit()
  49. {
  50.     print("\nHaus system by Piet™ v2.0.1\n");
  51.    
  52.     if(!dini_Exists("/Player_House_Data.ini"))dini_Create("/Player_House_Data.ini");
  53.    
  54.     LoadHouse();//lädt alle Häuser
  55.     return 1;
  56. }
  57.  
  58. public OnFilterScriptExit()
  59. {
  60.     SaveHouse();//speichert alle Häuser
  61.     return 1;
  62. }
  63.  
  64. public OnPlayerConnect(playerid)//Mapicon
  65. {
  66.     GetPlayerName(playerid, SpielerName(playerid), MAX_PLAYER_NAME);
  67.     new str[32];
  68.     format(str, 32, "%s_HausJA", SpielerName(playerid));
  69.     Player[playerid][HausJA] = dini_Int("/Player_House_Data.ini", str);
  70.     format(str, 32, "%s_HausNR", SpielerName(playerid));
  71.     Player[playerid][HausNR] = dini_Int("/Player_House_Data.ini", str);
  72.    
  73.     for(new o=0; o<MAX_HOUSES; o++)
  74.     {
  75.         if(!h[o][besetzt])SetPlayerMapIcon(playerid, o, h[o][infox], h[o][infoy], 13.5, 31,0,MAPICON_LOCAL);
  76.         else SetPlayerMapIcon(playerid, o, h[o][infox], h[o][infoy], 13.5, 32,0,MAPICON_LOCAL);
  77.     }
  78.     return 1;
  79. }
  80.  
  81. public OnPlayerDisconnect(playerid, reason)
  82. {
  83.     new str[32];
  84.     format(str, 32, "%s_HausJA", SpielerName(playerid));
  85.     dini_IntSet("/Player_House_Data.ini", str, Player[playerid][HausJA]);
  86.     format(str, 32, "%s_HausNR", SpielerName(playerid));
  87.     dini_IntSet("/Player_House_Data.ini", str, Player[playerid][HausNR]);
  88.     return 1;
  89. }
  90.  
  91. ocmd:setposr(playerid,params[])//position wenn mann aus dem haus raus geht
  92. {
  93.     new o;
  94.     if(!isPlayerAnAdmin(playerid, 4))return SendClientMessage(playerid,ROT,"Du bist kein Adminstrator.");
  95.     if(sscanf(params,"i",o))return SendClientMessage(playerid,ROT,"/setposr [hausid]");
  96.     if(o>MAX_HOUSES||o<0)return SendClientMessage(playerid,ROT,"Das Haus existiert nicht.");
  97.     GetPlayerPos(playerid, h[o][rx], h[o][ry], h[o][rz]);
  98.     return 1;
  99. }
  100.  
  101. ocmd:setposi(playerid,params[])//informationen position setzen
  102. {
  103.     new o;
  104.     if(!isPlayerAnAdmin(playerid, 4))return SendClientMessage(playerid,ROT,"Du bist kein Adminstrator");
  105.     if(sscanf(params,"i",o))return SendClientMessage(playerid,ROT,"/setposi [hausid]");
  106.     if(o>MAX_HOUSES||o<0)return SendClientMessage(playerid,ROT,"Das Haus existiert nicht.");
  107.     GetPlayerPos(playerid, h[o][infox], h[o][infoy], h[o][infoz]);
  108.     UpdateHouse(o);
  109.     return 1;
  110. }
  111.  
  112. ocmd:setposh(playerid,params[])//haus position vom interior und pos wenn mann rein geht
  113. {
  114.     new o;
  115.     if(!isPlayerAnAdmin(playerid, 4))return SendClientMessage(playerid,ROT,"Du bist kein Adminstrator");
  116.     if(sscanf(params,"i",o))return SendClientMessage(playerid,ROT,"/setposh [hausid]");
  117.     if(o>MAX_HOUSES||o<0)return SendClientMessage(playerid,ROT,"Das Haus existiert nicht.");
  118.     GetPlayerPos(playerid, h[o][hx], h[o][hy], h[o][hz]);
  119.     h[o][int] = GetPlayerInterior(playerid);
  120.     return 1;
  121. }
  122.  
  123. ocmd:setprice(playerid,params[])//preis setzten
  124. {
  125.     new p, o;
  126.     if(!isPlayerAnAdmin(playerid, 4))return SendClientMessage(playerid,ROT,"Du bist kein Adminstrator");
  127.     if(sscanf(params,"ii",o,p))return SendClientMessage(playerid,ROT,"/setprice [hausid] [preis]");
  128.     if(o>MAX_HOUSES||o<0)return SendClientMessage(playerid,ROT,"Das Haus existiert nicht");
  129.     if(h[o][besetzt])return SendClientMessage(playerid,ROT,"Das Haus steht nicht zum Verkauf");
  130.     if(p<1000||p>1000000)return SendClientMessage(playerid,ROT,"Min 1.000€ , Max 1.000.000€");
  131.     //Preis wird jetzt gesetzt
  132.     h[o][preis] = p;
  133.     new string[128];
  134.     format(string, sizeof(string), "Du hast den Preis vom Haus %d auf %d€ gesetzt", o, h[o][preis]);
  135.     SendClientMessage(playerid, GRUN, string);
  136.     UpdateHouse(o);
  137.     return 1;
  138. }
  139.  
  140. ocmd:sellhaus(playerid,params[])//haus verkaufen
  141. {
  142.     new p;
  143.     if(sscanf(params,"i",p))return SendClientMessage(playerid,ROT,"/sellhaus [preis]");
  144.     if(!Player[playerid][HausJA])return SendClientMessage(playerid,ROT,"Sie besitzen kein Haus.");
  145.     if(p<1000||p>1000000)return SendClientMessage(playerid,ROT,"Min 1.000€ , Max 1.000.000€.");
  146.     new o = Player[playerid][HausNR];
  147.     h[o][besetzt] = 0;
  148.     Player[playerid][HausJA] = 0;
  149.     Player[playerid][HausNR] = -1;
  150.     h[o][preis] = p;
  151.     GivePlayerMoney(playerid, p);
  152.     UpdateHouse(o);
  153.     return 1;
  154. }
  155.  
  156. ocmd:buyhaus(playerid,params[])//haus kaufen
  157. {
  158.     new o;
  159.     if(sscanf(params,"i",o))return SendClientMessage(playerid,ROT,"/buyhaus [id]");
  160.     if(Player[playerid][HausJA])return SendClientMessage(playerid,ROT,"Sie besitzen bereits ein Haus.");
  161.     if(o>MAX_HOUSES||o<0)return SendClientMessage(playerid,ROT,"Das Haus existiert nicht.");
  162.     if(h[o][besetzt])return SendClientMessage(playerid,ROT,"Das Haus steht nicht zum Verkauf.");
  163.     new string[256];
  164.     format(string, sizeof(string), "Sie Brauchen mindestens %d€ um Haus %d kaufen zu können.", h[o][preis]);
  165.     if(GetPlayerMoney(playerid)<h[o][preis])return SendClientMessage(playerid,ROT,string);
  166.     //Haus wird jetzt gekauft
  167.     format(h[o][besitzer], MAX_PLAYER_NAME, "%s", SpielerName(playerid));
  168.     Player[playerid][HausJA] = 1;
  169.     Player[playerid][HausNR] = o;
  170.     GivePlayerMoney(playerid, -h[o][preis]);
  171.     h[o][besetzt] = 1;
  172.     new str[128];
  173.     format(str, sizeof(str), "%s hat das Haus NR %d gekauft", SpielerName(playerid));
  174.     SendClientMessageToAll(GRUN, str);
  175.     format(str, sizeof(str), "Du hast das Haus %d für %d gekauft", o, h[o][preis]);
  176.     SendClientMessage(playerid, GRUN, str);
  177.     UpdateHouse(o);
  178.     h[o][preis] = 0;
  179.     //haus gekauft
  180.     return 1;
  181. }
  182.  
  183. public OnPlayerCommandText(playerid, cmdtext[])//alle commands
  184. {
  185.     if(!strcmp("/hhelp", cmdtext, true))
  186.     {
  187.         ShowPlayerDialog(playerid,DIALOG_HAUS,DIALOG_STYLE_MSGBOX ,"Haus Help","/exit um haus zu verlassen \n/setposi um die Info zu versetzen \nsetposh um die Position vom haus interior und anderemzu versetzen \nsetposr um die position wenn mann raus kommt zu setzen \n/setprice um den preis des hauses zu setzen \n/buyhaus um ein haus zu kaufen \n/sellhaus um sein haus zu verkaufen","Ok","Cancel");
  188.         return 1;
  189.     }
  190.     if(!strcmp("/exit", cmdtext, true))
  191.     {
  192.         if(Player[playerid][Haus])
  193.         {
  194.             new o=Player[playerid][HausNR];
  195.             SetPlayerPos(playerid, h[o][rx], h[o][ry], h[o][rz]);
  196.             SetPlayerInterior(playerid, 0);
  197.             SendClientMessage(playerid, GRUN, "Du bist raus aus deinem Haus.");
  198.             Player[playerid][Haus] = 0;
  199.         }
  200.         else SendClientMessage(playerid, ROT, "Sie sind in keinem Haus.");
  201.         return 1;
  202.     }
  203.     return 0;
  204. }
  205.  
  206. public OnPlayerPickUpPickup(playerid, pickupid)//wenn die person in den pickup vom haus geht
  207. {
  208.     for(new o=0; o<MAX_HOUSES; o++)
  209.     {
  210.         if(pickupid==HousePickup[o] && o==Player[playerid][HausNR])
  211.         {
  212.             SetPlayerPos(playerid, h[o][hx], h[o][hy], h[o][hz]);
  213.             SetPlayerInterior(playerid, h[o][int]);
  214.             SendClientMessage(playerid, GRUN, "Willkommen in deinem Haus.");
  215.             Player[playerid][Haus] = 1;
  216.             return 1;
  217.         }
  218.     }
  219.     return 1;
  220. }
  221.  
  222. stock UpdateHouse(o)//updatet das Haus
  223. {
  224.     new str[512];
  225.     DestroyPickup(HousePickup[o]);
  226.     if(h[o][besetzt])
  227.     {
  228.         format(str, sizeof(str), "Haus-NR:%d \nBesitzer:%s \nBesetzt[ja] \nPreis:verkauft", o, h[o][besitzer]);
  229.         Delete3DTextLabel(Label[o]);
  230.         Label[o]=Create3DTextLabel(str, GRUN, h[o][infox], h[o][infoy], h[o][infoz], 7, 0);
  231.         HousePickup[o]=CreatePickup(1273, 1, h[o][infox], h[o][infoy], h[o][infoz]);
  232.     }
  233.     else if(!h[o][besetzt])
  234.     {
  235.         format(str, sizeof(str), "Haus-NR:%d \nBesitzer:Niemand \nBesetzt[nein] \nPreis:%d€", o, h[o][preis]);
  236.         Delete3DTextLabel(Label[o]);
  237.         Label[o]=Create3DTextLabel(str, GRUN, h[o][infox], h[o][infoy], h[o][infoz], 7, 0);
  238.         HousePickup[o]=CreatePickup(1272, 1, h[o][infox], h[o][infoy], h[o][infoz]);
  239.     }
  240.     for(new i=0; i<MAX_PLAYERS; i++)
  241.     {
  242.         if(!h[o][besetzt])SetPlayerMapIcon(i, o, h[o][infox], h[o][infoy], 13.5, 31,0,MAPICON_LOCAL);
  243.         else SetPlayerMapIcon(i, o, h[o][infox], h[o][infoy], 13.5, 32,0,MAPICON_LOCAL);
  244.     }
  245.     return 1;
  246. }
  247.  
  248. stock LoadHouse()//Lädt alle Häuser
  249. {
  250.     new load;
  251.     for(new o=0; o<MAX_HOUSES; o++)
  252.     {
  253.         new dat[64], string[512];
  254.         format(dat,sizeof(dat),"/House/%d.enumdat",o);
  255.         if(!dini_Exists(dat)){printf("House %d doesn't exists.", o);continue;}
  256.         printf("loadet %d from %s", o, dat);
  257.         h[o][besetzt] = dini_Int(dat, "besetzt");
  258.         format(h[o][besitzer], MAX_PLAYER_NAME, "%s", dini_Get(dat, "Besitzer"));
  259.         if(!h[o][besetzt])
  260.         {
  261.             format(string, sizeof(string), "Haus-NR:%d \nBesitzer:Niemand \nBesetzt[nein] \nPreis:%d", o, dini_Int(dat, "preis"));
  262.             HousePickup[o]=CreatePickup(1273, 1, h[o][infox], h[o][infoy], h[o][infoz]);
  263.         }
  264.         else if(h[o][besetzt])
  265.         {
  266.             format(string, sizeof(string), "Haus-NR:%d \nBesitzer:%s \nBesetzt[ja] \nPreis:verkauft", o, dini_Get(dat, "Besitzer"));
  267.             HousePickup[o]=CreatePickup(1272, 1, h[o][infox], h[o][infoy], h[o][infoz]);
  268.         }
  269.         h[o][hx] = dini_Float(dat, "x");
  270.         h[o][hy] = dini_Float(dat, "y");
  271.         h[o][hz] = dini_Float(dat, "z");
  272.         h[o][infox] = dini_Float(dat, "infox");
  273.         h[o][infoy] = dini_Float(dat, "infoy");
  274.         h[o][infoz] = dini_Float(dat, "infoz");
  275.         h[o][rx] = dini_Float(dat, "rx");
  276.         h[o][ry] = dini_Float(dat, "ry");
  277.         h[o][rz] = dini_Float(dat, "rz");
  278.         h[o][preis] = dini_Int(dat, "preis");
  279.         h[o][int] = dini_Int(dat, "int");
  280.         Label[o]=Create3DTextLabel(string, GRUN, h[o][infox], h[o][infoy], h[o][infoz], 7, 0);
  281.         load++;
  282.     }
  283.     printf("Loadet %d Houses", load);
  284.     return 1;
  285. }
  286.  
  287. stock SaveHouse()//Speichert alle Häuser
  288. {
  289.     new load;
  290.     for(new o=0; o<MAX_HOUSES; o++)
  291.     {
  292.         new dat[64];
  293.         format(dat,sizeof(dat),"/House/%d.enumdat",o);
  294.         printf("save %d to %s", o, dat);
  295.         if(!dini_Exists(dat))dini_Create(dat);
  296.         dini_FloatSet(dat, "x", h[o][hx]);
  297.         dini_FloatSet(dat, "y", h[o][hy]);
  298.         dini_FloatSet(dat, "z", h[o][hz]);
  299.         dini_FloatSet(dat, "rx", h[o][rx]);
  300.         dini_FloatSet(dat, "ry", h[o][ry]);
  301.         dini_FloatSet(dat, "rz", h[o][rz]);
  302.         dini_FloatSet(dat, "infox", h[o][infox]);
  303.         dini_FloatSet(dat, "infoy", h[o][infoy]);
  304.         dini_FloatSet(dat, "infoz", h[o][infoz]);
  305.         dini_IntSet(dat, "int", h[o][int]);
  306.         dini_IntSet(dat, "preis", h[o][preis]);
  307.         dini_Set(dat, "Besitzer", h[o][besitzer]);
  308.         dini_IntSet(dat, "besetzt", h[o][besetzt]);
  309.         load++;
  310.     }
  311.     printf("Save %d Houses", load);
  312.     return 1;
  313. }
  314.  
  315. stock isPlayerAnAdmin(playerid, rang)//ob spieler ein admin ist
  316. {
  317.     #pragma unused rang
  318.     if(IsPlayerAdmin(playerid))return 1;
  319.     return 0;
  320. }
  321.  
  322. stock sscanf(sstring[], format[], {Float,_}:...)//sscanf für die ocmd befehle
  323. {
  324.     #if defined isnull
  325.         if (isnull(sstring))
  326.     #else
  327.         if (sstring[0] == 0 || (sstring[0] == 1 && sstring[1] == 0))
  328.     #endif
  329.         {
  330.             return format[0];
  331.         }
  332.     #pragma tabsize 4
  333.     new
  334.         formatPos = 0,
  335.         sstringPos = 0,
  336.         paramPos = 2,
  337.         paramCount = numargs(),
  338.         delim = ' ';
  339.     while (sstring[sstringPos] && sstring[sstringPos] <= ' ')
  340.     {
  341.         sstringPos++;
  342.     }
  343.     while (paramPos < paramCount && sstring[sstringPos])
  344.     {
  345.         switch (format[formatPos++])
  346.         {
  347.             case '\0':
  348.             {
  349.                 return 0;
  350.             }
  351.             case 'i', 'd':
  352.             {
  353.                 new
  354.                     neg = 1,
  355.                     num = 0,
  356.                     ch = sstring[sstringPos];
  357.                 if (ch == '-')
  358.                 {
  359.                     neg = -1;
  360.                     ch = sstring[++sstringPos];
  361.                 }
  362.                 do
  363.                 {
  364.                     sstringPos++;
  365.                     if ('0' <= ch <= '9')
  366.                     {
  367.                         num = (num * 10) + (ch - '0');
  368.                     }
  369.                     else
  370.                     {
  371.                         return -1;
  372.                     }
  373.                 }
  374.                 while ((ch = sstring[sstringPos]) > ' ' && ch != delim);
  375.                 setarg(paramPos, 0, num * neg);
  376.             }
  377.             case 'h', 'x':
  378.             {
  379.                 new
  380.                     num = 0,
  381.                     ch = sstring[sstringPos];
  382.                 do
  383.                 {
  384.                     sstringPos++;
  385.                     switch (ch)
  386.                     {
  387.                         case 'x', 'X':
  388.                         {
  389.                             num = 0;
  390.                             continue;
  391.                         }
  392.                         case '0' .. '9':
  393.                         {
  394.                             num = (num << 4) | (ch - '0');
  395.                         }
  396.                         case 'a' .. 'f':
  397.                         {
  398.                             num = (num << 4) | (ch - ('a' - 10));
  399.                         }
  400.                         case 'A' .. 'F':
  401.                         {
  402.                             num = (num << 4) | (ch - ('A' - 10));
  403.                         }
  404.                         default:
  405.                         {
  406.                             return -1;
  407.                         }
  408.                     }
  409.                 }
  410.                 while ((ch = sstring[sstringPos]) > ' ' && ch != delim);
  411.                 setarg(paramPos, 0, num);
  412.             }
  413.             case 'c':
  414.             {
  415.                 setarg(paramPos, 0, sstring[sstringPos++]);
  416.             }
  417.             case 'f':
  418.             {
  419.  
  420.                 new changestr[16], changepos = 0, strpos = sstringPos;
  421.                 while(changepos < 16 && sstring[strpos] && sstring[strpos] != delim)
  422.                 {
  423.                     changestr[changepos++] = sstring[strpos++];
  424.                     }
  425.                 changestr[changepos] = '\0';
  426.                 setarg(paramPos,0,_:floatstr(changestr));
  427.             }
  428.             case 'p':
  429.             {
  430.                 delim = format[formatPos++];
  431.                 continue;
  432.             }
  433.             case '\'':
  434.             {
  435.                 new
  436.                     end = formatPos - 1,
  437.                     ch;
  438.                 while ((ch = format[++end]) && ch != '\'') {}
  439.                 if (!ch)
  440.                 {
  441.                     return -1;
  442.                 }
  443.                 format[end] = '\0';
  444.                 if ((ch = strfind(sstring, format[formatPos], false, sstringPos)) == -1)
  445.                 {
  446.                     if (format[end + 1])
  447.                     {
  448.                         return -1;
  449.                     }
  450.                     return 0;
  451.                 }
  452.                 format[end] = '\'';
  453.                 sstringPos = ch + (end - formatPos);
  454.                 formatPos = end + 1;
  455.             }
  456.             case 'u':
  457.             {
  458.                 new
  459.                     end = sstringPos - 1,
  460.                     id = 0,
  461.                     bool:num = true,
  462.                     ch;
  463.                 while ((ch = sstring[++end]) && ch != delim)
  464.                 {
  465.                     if (num)
  466.                     {
  467.                         if ('0' <= ch <= '9')
  468.                         {
  469.                             id = (id * 10) + (ch - '0');
  470.                         }
  471.                         else
  472.                         {
  473.                             num = false;
  474.                         }
  475.                     }
  476.                 }
  477.                 if (num && IsPlayerConnected(id))
  478.                 {
  479.                     setarg(paramPos, 0, id);
  480.                 }
  481.                 else
  482.                 {
  483.                     #if !defined foreach
  484.                         #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  485.                         #define __SSCANF_FOREACH__
  486.                     #endif
  487.                     sstring[end] = '\0';
  488.                     num = false;
  489.                     new
  490.                         name[MAX_PLAYER_NAME];
  491.                     id = end - sstringPos;
  492.                     foreach (Player, playerid)
  493.                     {
  494.                         GetPlayerName(playerid, name, sizeof (name));
  495.                         if (!strcmp(name, sstring[sstringPos], true, id))
  496.                         {
  497.                             setarg(paramPos, 0, playerid);
  498.                             num = true;
  499.                             break;
  500.                         }
  501.                     }
  502.                     if (!num)
  503.                     {
  504.                         setarg(paramPos, 0, INVALID_PLAYER_ID);
  505.                     }
  506.                     sstring[end] = ch;
  507.                     #if defined __SSCANF_FOREACH__
  508.                         #undef foreach
  509.                         #undef __SSCANF_FOREACH__
  510.                     #endif
  511.                 }
  512.                 sstringPos = end;
  513.             }
  514.             case 's', 'z':
  515.             {
  516.                 new
  517.                     i = 0,
  518.                     ch;
  519.                 if (format[formatPos])
  520.                 {
  521.                     while ((ch = sstring[sstringPos++]) && ch != delim)
  522.                     {
  523.                         setarg(paramPos, i++, ch);
  524.                     }
  525.                     if (!i)
  526.                     {
  527.                         return -1;
  528.                     }
  529.                 }
  530.                 else
  531.                 {
  532.                     while ((ch = sstring[sstringPos++]))
  533.                     {
  534.                         setarg(paramPos, i++, ch);
  535.                     }
  536.                 }
  537.                 sstringPos--;
  538.                 setarg(paramPos, i, '\0');
  539.             }
  540.             default:
  541.             {
  542.                 continue;
  543.             }
  544.         }
  545.         while (sstring[sstringPos] && sstring[sstringPos] != delim && sstring[sstringPos] > ' ')
  546.         {
  547.             sstringPos++;
  548.         }
  549.         while (sstring[sstringPos] && (sstring[sstringPos] == delim || sstring[sstringPos] <= ' '))
  550.         {
  551.             sstringPos++;
  552.         }
  553.         paramPos++;
  554.     }
  555.     do
  556.     {
  557.         if ((delim = format[formatPos++]) > ' ')
  558.         {
  559.             if (delim == '\'')
  560.             {
  561.                 while ((delim = format[formatPos++]) && delim != '\'') {}
  562.             }
  563.             else if (delim != 'z')
  564.             {
  565.                 return delim;
  566.             }
  567.         }
  568.     }
  569.     while (delim > ' ');
  570.     return 0;
  571. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement