Advertisement
Guest User

iKofferbombensystem von IntelligenT

a guest
Dec 24th, 2012
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 15.71 KB | None | 0 0
  1. //|===========================Kofferbombensystem von IntelligenT==================================|
  2.  
  3. //===========================Teil: Includes==================================
  4.  
  5. #include <a_samp>
  6. #include <UC>
  7.  
  8. //===========================Teil: Konfiguration==================================
  9.  
  10. #define SM_X 1285.2001 // Schwarzmarkt X-Koordinate vom Befehl
  11. #define SM_Y -1252.7443 // Schwarzmarkt Y-Koordinate vom Befehl
  12. #define SM_Z 13.5469 // Schwarzmarkt Z-Koordinate vom Befehl
  13. #define SM_RANGE 15.0 // Schwarzmarkt Range vom Befehl
  14. #define BOMBEN_PREIS 100000 // Preis einer Kofferbombe
  15.  
  16. //===========================Teil: Enum | Define | new==================================
  17.  
  18. enum eKoffer
  19. {
  20.     Bombe,
  21.     HatKoffer,
  22.     BombenTimer,
  23.     BombeAktiv,
  24.     KofferAbgelegt,
  25.     Float:KofferX,
  26.     Float:KofferY,
  27.     Float:KofferZ
  28. }
  29. new KofferInfo[MAX_PLAYERS][eKoffer];
  30.  
  31. #define DIALOG_KOFFERMENU 6784
  32. #define DIALOG_KOFFERTIMER 6785
  33. #define DIALOG_KOFFERAKTIV 6786
  34. #define DIALOG_KOFFERKAUFEN 6787
  35. #define COLOR_BOMBEN_RED 0x7D0000FF
  36. #define COLOR_BOMBEN_GREEN 0x33AA33AA
  37. #define COLOR_BOMBEN_GRAD1 0xB4B5B7FF
  38.  
  39. new Text:SP0 = Text:INVALID_TEXT_DRAW;
  40. new Text:SP1 = Text:INVALID_TEXT_DRAW;
  41. new Text:SP2[MAX_PLAYERS] = Text:INVALID_TEXT_DRAW;
  42. new SuchTimer[MAX_PLAYERS];
  43. new PruferAktiv[MAX_PLAYERS]=0;
  44.  
  45. //===========================Teil: OnFilterScriptInit==================================
  46.  
  47. public OnFilterScriptInit()
  48. {
  49.     printf("Filterscript [FS]iKofferbomben.amx von IntelligenT geladen\n");
  50.     new string[450]; format(string,sizeof string," Schwarzmarkt - /kofferkaufen um einen Bombenkoffer zu kaufen - Preis: $%d",BOMBEN_PREIS);
  51.     Create3DTextLabel(string, 0xFFFFFFFF, SM_X,SM_Y,SM_Z,SM_RANGE,0);
  52.     CreatePickup(1239,23,SM_X,SM_Y,SM_Z,-1);
  53.     SP0 = TextDrawCreate(164.500, 281.937, "box");
  54.     TextDrawLetterSize(SP0, 0.000, 4.716);
  55.     TextDrawTextSize(SP0, 27.500, 0.000);
  56.     TextDrawAlignment(SP0, 1);
  57.     TextDrawColor(SP0, 0);
  58.     TextDrawUseBox(SP0, 1);
  59.     TextDrawBoxColor(SP0, 102);
  60.     TextDrawFont(SP0, 0);
  61.  
  62.     SP1 = TextDrawCreate(37.500, 284.375, "Sprengstofftester");
  63.     TextDrawLetterSize(SP1, 0.391, 1.735);
  64.     TextDrawTextSize(SP1, -12.000, -1.312);
  65.     TextDrawAlignment(SP1, 1);
  66.     TextDrawColor(SP1, 929169407);
  67.     TextDrawSetOutline(SP1, 1);
  68.     TextDrawBackgroundColor(SP1, 51);
  69.     TextDrawFont(SP1, 1);
  70.     TextDrawSetProportional(SP1, 1);
  71.    
  72.     for(new playerid=0; playerid < MAX_PLAYERS; playerid++)
  73.     {
  74.         SP2[playerid] = TextDrawCreate(36.000, 304.062, "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
  75.         TextDrawLetterSize(SP2[playerid], 0.184, 1.629);
  76.         TextDrawAlignment(SP2[playerid], 1);
  77.         TextDrawColor(SP2[playerid], -1);
  78.         TextDrawSetOutline(SP2[playerid], 1);
  79.         TextDrawBackgroundColor(SP2[playerid], 51);
  80.         TextDrawFont(SP2[playerid], 2);
  81.         TextDrawSetProportional(SP2[playerid], 1);
  82.         KofferInfo[playerid][HatKoffer]=0;
  83.         KofferInfo[playerid][BombeAktiv]=0;
  84.         KofferInfo[playerid][BombenTimer]=10;
  85.         KofferInfo[playerid][KofferAbgelegt]=0;
  86.         PruferAktiv[playerid]=0;
  87.     }
  88.     return 1;
  89. }
  90.  
  91. //===========================Teil: OnPlayerConnect==================================
  92.  
  93. public OnPlayerConnect(playerid)
  94. {
  95.     KofferInfo[playerid][HatKoffer]=0;
  96.     KofferInfo[playerid][BombeAktiv]=0;
  97.     KofferInfo[playerid][BombenTimer]=10;
  98.     KofferInfo[playerid][KofferAbgelegt]=0;
  99.     PruferAktiv[playerid]=0;
  100.     return 1;
  101. }
  102.  
  103. //===========================Teil: OnDialogResponse==================================
  104.  
  105. public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
  106. {
  107.     if(dialogid == DIALOG_KOFFERMENU)
  108.     {
  109.         if(response)
  110.         {
  111.             switch(listitem)
  112.             {
  113.                 case 0: { ShowPlayerDialog(playerid,DIALOG_KOFFERTIMER,DIALOG_STYLE_INPUT,"Einstellen des Bombentimers","Nach wievielen Sekunden soll deine Bombe explodieren ?","Einstellen","Zurück"); }
  114.                 case 1: { new string5[256]; format(string5,256,"Möchtest du die Bombe aktivieren ?\n\nAktuelle Timerzeit: %i Sekunden\n\nKlicke auf 'Aktivieren', um die Bombe mit dieser Einstellung zu aktivieren.",KofferInfo[playerid][BombenTimer]); ShowPlayerDialog(playerid,DIALOG_KOFFERAKTIV,DIALOG_STYLE_MSGBOX,"Bombe aktivieren",string5,"Aktivieren","Beenden");}
  115.                 case 2:
  116.                 {
  117.                     if(KofferInfo[playerid][BombeAktiv]==0) return SendClientMessage(playerid,COLOR_BOMBEN_RED,"Kofferbombe ist nicht aktiv!");
  118.                     new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z);
  119.                     KofferInfo[playerid][Bombe]=CreateObject(1210,x,y,z-0.8,0.0,0.0,0.0);
  120.                     KofferInfo[playerid][KofferX]=x; KofferInfo[playerid][KofferY]=y; KofferInfo[playerid][KofferZ]=z; KofferInfo[playerid][KofferAbgelegt]=1;
  121.                     RemovePlayerAttachedObject(playerid, 5);
  122.                     SendClientMessage(playerid,COLOR_BOMBEN_GREEN,"Kofferbombe abgelegt.");
  123.                 }
  124.             }
  125.         }
  126.     }
  127.     if(dialogid == DIALOG_KOFFERTIMER)
  128.     {
  129.         if(response)
  130.         {
  131.             if(strval(inputtext) > 0 && strlen(inputtext) > 0)
  132.             KofferInfo[playerid][BombenTimer]=strval(inputtext);
  133.             new string5[256]; format(string5,256,"Timer einstellen - Aktuelle Zeit: %i Sekunden\nBombe Aktivieren\n\nKoffer ablegen - Geht nur wenn er aktiv ist!\nBeenden",KofferInfo[playerid][BombenTimer]);
  134.             ShowPlayerDialog(playerid,DIALOG_KOFFERMENU,DIALOG_STYLE_LIST,"Wähle eine Option",string5,"Weiter","Beenden");
  135.         }
  136.     }
  137.     if(dialogid == DIALOG_KOFFERAKTIV)
  138.     {
  139.         if(response)
  140.         {
  141.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_BOMBEN_RED,"Du kannst die Kofferbombe in einem Fahrzeug nicht aktivieren!");
  142.             KofferInfo[playerid][BombeAktiv]=1;
  143.             new interval=KofferInfo[playerid][BombenTimer]*1000; SetTimerEx("KofferTimer",interval,0,"i",playerid);
  144.             SetPlayerAttachedObject( playerid, 5, 1210, 5, 0.293188, -0.024004, 0.056436, 144.529037, 278.794769, 0.000000, 1.000000, 1.000000, 1.000000 );
  145.         }
  146.     }
  147.     if(dialogid == DIALOG_KOFFERKAUFEN)
  148.     {
  149.         if(response)
  150.         {
  151.             GivePlayerMoney(playerid, -BOMBEN_PREIS); KofferInfo[playerid][HatKoffer]=1;
  152.             SendClientMessage(playerid, COLOR_BOMBEN_GREEN,"Herzlichen Glückwunsch zum Kauf eines Bombenkoffer's. '/koffer' zum Einstellen der Bombe!");
  153.         }
  154.     }
  155.     return 1;
  156. }
  157.  
  158. //===========================Teil: Befehle und Script==================================
  159.  
  160. UC-koffer(pp-)
  161. {
  162.     new string[256];
  163.     if(KofferInfo[playerid][HatKoffer] == 0) return SendClientMessage(playerid, COLOR_BOMBEN_GRAD1, "Du hast keinen Koffer!");
  164.     format(string,256,"Timer einstellen - Aktuelle Zeit: %i Sekunden\nBombe Aktivieren\n\nKoffer ablegen - Geht nur wenn er aktiv ist!\nBeenden",KofferInfo[playerid][BombenTimer]);
  165.     ShowPlayerDialog(playerid,DIALOG_KOFFERMENU,DIALOG_STYLE_LIST,"Wähle eine Option",string,"Weiter","Beenden");
  166.     return 1;
  167. }
  168.  
  169. forward KofferTimer(playerid);
  170. public KofferTimer(playerid)
  171. {
  172.     if(KofferInfo[playerid][KofferAbgelegt] == 1)
  173.     {
  174.         CreateExplosion(KofferInfo[playerid][KofferX],KofferInfo[playerid][KofferY],KofferInfo[playerid][KofferZ],3,1000.0);
  175.         for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i,25.0,KofferInfo[playerid][KofferX],KofferInfo[playerid][KofferY],KofferInfo[playerid][KofferZ])) { SetPlayerHealth(i,0); } else if(IsPlayerInRangeOfPoint(i,51.0,KofferInfo[playerid][KofferX],KofferInfo[playerid][KofferY],KofferInfo[playerid][KofferZ])) { ResetStatus(playerid); } }
  176.     }
  177.     else
  178.     {
  179.         new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); CreateExplosion(x,y,z,3,1000.0);
  180.         for(new i=0; i<MAX_PLAYERS; i++) {
  181.         if(IsPlayerInRangeOfPoint(i,25.0,x,y,z)) { SetPlayerHealth(i,0); } else if(IsPlayerInRangeOfPoint(i,51.0,x,y,z)) { ResetStatus(playerid); } }
  182.     }
  183.     KofferInfo[playerid][HatKoffer]=0; KofferInfo[playerid][BombeAktiv]=0; KofferInfo[playerid][BombenTimer]=10; KofferInfo[playerid][KofferAbgelegt]=0;
  184.     DestroyObject(KofferInfo[playerid][Bombe]);
  185.     SendClientMessage(playerid,COLOR_BOMBEN_GREEN,"Kofferbombe ist explodiert.");
  186.     return 1;
  187. }
  188.  
  189. UC-money(pp-)
  190. {
  191.     GivePlayerMoney(playerid,BOMBEN_PREIS);
  192.     return 1;
  193. }
  194.  
  195. UC-kofferkaufen(pp-)
  196. {
  197.     if(!IsPlayerInRangeOfPoint(playerid,SM_RANGE,SM_X,SM_Y,SM_Z)) { SendClientMessage(playerid,0xAA3333AA,"Du bist nicht beim Schwarzmarkt!"); return 1; }
  198.     if(KofferInfo[playerid][HatKoffer] == 1) return SendClientMessage(playerid,0xAA3333AA,"Du hast bereits einen Koffer!");
  199.     if(GetPlayerMoney(playerid) < BOMBEN_PREIS) return SendClientMessage(playerid,0xAA3333AA,"Du hast nicht genügend Geld!");
  200.     ShowPlayerDialog(playerid, DIALOG_KOFFERKAUFEN, DIALOG_STYLE_MSGBOX, "Los Santos Schwarzmarkt", "Möchtest du für 100.000$ einen Bombenkoffer kaufen ?", "Ja", "Nein");
  201.     return 1;
  202. }
  203.  
  204. UC-pruefer(pp-)
  205. {
  206.     /*if(IsACop(playerid))
  207.     {*/
  208.         new Tat;
  209.         if(sscanf(params,"i",Tat)){ SendClientMessage(playerid, COLOR_BOMBEN_GRAD1, "Benutzung: /pruefer [Nummer]"); SendClientMessage(playerid, COLOR_BOMBEN_GRAD1, "Nummern: 1 = An | 0 = Aus"); return 1; }
  210.         if(Tat==1) { ShowPrufer(playerid); SuchTimer[playerid] = SetTimerEx("SuchBombe",1000,1,"i",playerid); SendClientMessage(playerid,COLOR_BOMBEN_GREEN,"Sprengstoffprüfer aktiviert."); }
  211.         else { KillTimer(SuchTimer[playerid]); HidePrufer(playerid); SendClientMessage(playerid,COLOR_BOMBEN_GREEN,"Sprengstoffprüfer deaktiviert."); }
  212.         return 1;
  213.     /*}
  214.     else return SendClientMessage(playerid,COLOR_BOMBEN_RED,"Du bist kein Beamter!");*/
  215. }
  216.  
  217. stock ShowPrufer(playerid)
  218. {
  219.     ResetStatus(playerid);
  220.     TextDrawShowForPlayer(playerid,SP0);
  221.     TextDrawShowForPlayer(playerid,SP1);
  222.     TextDrawShowForPlayer(playerid,SP2[playerid]);
  223.     PruferAktiv[playerid] = 1;
  224.     return 1;
  225. }
  226.  
  227. stock HidePrufer(playerid)
  228. {
  229.     TextDrawHideForPlayer(playerid,SP0);
  230.     TextDrawHideForPlayer(playerid,SP1);
  231.     TextDrawHideForPlayer(playerid,SP2[playerid]);
  232.     PruferAktiv[playerid] = 0;
  233.     return 1;
  234. }
  235.  
  236. stock ResetStatus(playerid)
  237. {
  238.     new string[256];
  239.     format(string,sizeof(string),"~w~IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII");
  240.     TextDrawSetString(SP2[playerid],string);
  241. }
  242.  
  243. forward SuchBombe(playerid);
  244. public SuchBombe(playerid)
  245. {
  246.     if(PruferAktiv[playerid] == 1)
  247.     {
  248.         for(new i=0; i<MAX_PLAYERS; i++)
  249.         {
  250.             if(KofferInfo[i][BombeAktiv] == 1)
  251.             {
  252.                 new string[256];
  253.                 if(KofferInfo[i][KofferAbgelegt] == 1)
  254.                 {
  255.                     new Float:Distanz = GetPlayerDistanceFromPoint(playerid,KofferInfo[i][KofferX],KofferInfo[i][KofferY],KofferInfo[i][KofferZ]);
  256.                     if(Distanz > 50) { format(string,sizeof(string),"~w~IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"); }
  257.                     else
  258.                     {
  259.                         new abstand = 51-floatround(Distanz);
  260.                         format(string,sizeof(string),"~r~IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII");
  261.                         string[abstand+2] = '~'; string[abstand+3] = 'w'; string[abstand+4] = '~';
  262.                     }
  263.                     TextDrawSetString(SP2[playerid],string);
  264.                 }
  265.                 else
  266.                 {
  267.                     new Float:x,Float:y,Float:z;
  268.                     GetPlayerPos(i,x,y,z);
  269.                     new Float:Distanz = GetPlayerDistanceFromPoint(playerid,x,y,z);
  270.                     if(Distanz > 50) { format(string,sizeof(string),"~w~IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"); }
  271.                     else
  272.                     {
  273.                         new abstand = 51-floatround(Distanz);
  274.                         format(string,sizeof(string),"~r~IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII");
  275.                         string[abstand+2] = '~'; string[abstand+3] = 'w'; string[abstand+4] = '~';
  276.                     }
  277.                     TextDrawSetString(SP2[playerid],string);
  278.                 }
  279.             }
  280.         }
  281.     }
  282.     return 1;
  283. }
  284.  
  285. //===========================Teil: SSCANF==================================
  286.  
  287. stock sscanf(string[], format[], {Float,_}:...)
  288. {
  289.     #if defined isnull
  290.         if (isnull(string))
  291.     #else
  292.         if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  293.     #endif
  294.         {
  295.             return format[0];
  296.         }
  297.     #pragma tabsize 4
  298.     new
  299.         formatPos = 0,
  300.         stringPos = 0,
  301.         paramPos = 2,
  302.         paramCount = numargs(),
  303.         delim = ' ';
  304.     while (string[stringPos] && string[stringPos] <= ' ')
  305.     {
  306.         stringPos++;
  307.     }
  308.     while (paramPos < paramCount && string[stringPos])
  309.     {
  310.         switch (format[formatPos++])
  311.         {
  312.             case '\0':
  313.             {
  314.                 return 0;
  315.             }
  316.             case 'i', 'd':
  317.             {
  318.                 new
  319.                     neg = 1,
  320.                     num = 0,
  321.                     ch = string[stringPos];
  322.                 if (ch == '-')
  323.                 {
  324.                     neg = -1;
  325.                     ch = string[++stringPos];
  326.                 }
  327.                 do
  328.                 {
  329.                     stringPos++;
  330.                     if ('0' <= ch <= '9')
  331.                     {
  332.                         num = (num * 10) + (ch - '0');
  333.                     }
  334.                     else
  335.                     {
  336.                         return -1;
  337.                     }
  338.                 }
  339.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  340.                 setarg(paramPos, 0, num * neg);
  341.             }
  342.             case 'h', 'x':
  343.             {
  344.                 new
  345.                     num = 0,
  346.                     ch = string[stringPos];
  347.                 do
  348.                 {
  349.                     stringPos++;
  350.                     switch (ch)
  351.                     {
  352.                         case 'x', 'X':
  353.                         {
  354.                             num = 0;
  355.                             continue;
  356.                         }
  357.                         case '0' .. '9':
  358.                         {
  359.                             num = (num << 4) | (ch - '0');
  360.                         }
  361.                         case 'a' .. 'f':
  362.                         {
  363.                             num = (num << 4) | (ch - ('a' - 10));
  364.                         }
  365.                         case 'A' .. 'F':
  366.                         {
  367.                             num = (num << 4) | (ch - ('A' - 10));
  368.                         }
  369.                         default:
  370.                         {
  371.                             return -1;
  372.                         }
  373.                     }
  374.                 }
  375.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  376.                 setarg(paramPos, 0, num);
  377.             }
  378.             case 'c':
  379.             {
  380.                 setarg(paramPos, 0, string[stringPos++]);
  381.             }
  382.             case 'f':
  383.             {
  384.  
  385.                 new changestr[16], changepos = 0, strpos = stringPos;
  386.                 while(changepos < 16 && string[strpos] && string[strpos] != delim)
  387.                 {
  388.                     changestr[changepos++] = string[strpos++];
  389.                     }
  390.                 changestr[changepos] = '\0';
  391.                 setarg(paramPos,0,_:floatstr(changestr));
  392.             }
  393.             case 'p':
  394.             {
  395.                 delim = format[formatPos++];
  396.                 continue;
  397.             }
  398.             case '\'':
  399.             {
  400.                 new
  401.                     end = formatPos - 1,
  402.                     ch;
  403.                 while ((ch = format[++end]) && ch != '\'') {}
  404.                 if (!ch)
  405.                 {
  406.                     return -1;
  407.                 }
  408.                 format[end] = '\0';
  409.                 if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
  410.                 {
  411.                     if (format[end + 1])
  412.                     {
  413.                         return -1;
  414.                     }
  415.                     return 0;
  416.                 }
  417.                 format[end] = '\'';
  418.                 stringPos = ch + (end - formatPos);
  419.                 formatPos = end + 1;
  420.             }
  421.             case 'u':
  422.             {
  423.                 new
  424.                     end = stringPos - 1,
  425.                     id = 0,
  426.                     bool:num = true,
  427.                     ch;
  428.                 while ((ch = string[++end]) && ch != delim)
  429.                 {
  430.                     if (num)
  431.                     {
  432.                         if ('0' <= ch <= '9')
  433.                         {
  434.                             id = (id * 10) + (ch - '0');
  435.                         }
  436.                         else
  437.                         {
  438.                             num = false;
  439.                         }
  440.                     }
  441.                 }
  442.                 if (num && IsPlayerConnected(id))
  443.                 {
  444.                     setarg(paramPos, 0, id);
  445.                 }
  446.                 else
  447.                 {
  448.                     #if !defined foreach
  449.                         #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  450.                         #define __SSCANF_FOREACH__
  451.                     #endif
  452.                     string[end] = '\0';
  453.                     num = false;
  454.                     new
  455.                         name[MAX_PLAYER_NAME];
  456.                     id = end - stringPos;
  457.                     foreach (Player, playerid)
  458.                     {
  459.                         GetPlayerName(playerid, name, sizeof (name));
  460.                         if (!strcmp(name, string[stringPos], true, id))
  461.                         {
  462.                             setarg(paramPos, 0, playerid);
  463.                             num = true;
  464.                             break;
  465.                         }
  466.                     }
  467.                     if (!num)
  468.                     {
  469.                         setarg(paramPos, 0, INVALID_PLAYER_ID);
  470.                     }
  471.                     string[end] = ch;
  472.                     #if defined __SSCANF_FOREACH__
  473.                         #undef foreach
  474.                         #undef __SSCANF_FOREACH__
  475.                     #endif
  476.                 }
  477.                 stringPos = end;
  478.             }
  479.             case 's', 'z':
  480.             {
  481.                 new
  482.                     i = 0,
  483.                     ch;
  484.                 if (format[formatPos])
  485.                 {
  486.                     while ((ch = string[stringPos++]) && ch != delim)
  487.                     {
  488.                         setarg(paramPos, i++, ch);
  489.                     }
  490.                     if (!i)
  491.                     {
  492.                         return -1;
  493.                     }
  494.                 }
  495.                 else
  496.                 {
  497.                     while ((ch = string[stringPos++]))
  498.                     {
  499.                         setarg(paramPos, i++, ch);
  500.                     }
  501.                 }
  502.                 stringPos--;
  503.                 setarg(paramPos, i, '\0');
  504.             }
  505.             default:
  506.             {
  507.                 continue;
  508.             }
  509.         }
  510.         while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
  511.         {
  512.             stringPos++;
  513.         }
  514.         while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
  515.         {
  516.             stringPos++;
  517.         }
  518.         paramPos++;
  519.     }
  520.     do
  521.     {
  522.         if ((delim = format[formatPos++]) > ' ')
  523.         {
  524.             if (delim == '\'')
  525.             {
  526.                 while ((delim = format[formatPos++]) && delim != '\'') {}
  527.             }
  528.             else if (delim != 'z')
  529.             {
  530.                 return delim;
  531.             }
  532.         }
  533.     }
  534.     while (delim > ' ');
  535.     return 0;
  536. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement