Guest User

Untitled

a guest
Jun 24th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.47 KB | None | 0 0
  1. if(dialogid == 3131)
  2. if(response)
  3. {
  4. SPD(playerid, 254, DIALOG_STYLE_INPUT, "Napisi pitanje:MORA BITI U VALIDNOM FORMATU I KONKTRETNO", "Pitanje:MORA BITI U VALIDNOM FORMATU I KONKTRETNO", "Uredu", "");
  5. }
  6. if(!response)
  7. {
  8. SPD(playerid, 254, DIALOG_STYLE_INPUT, "Napisi pitanje:MORA BITI U VALIDNOM FORMATU I KONKTRETNO", "Pitanje:MORA BITI U VALIDNOM FORMATU I KONKTRETNO", "Uredu", "");
  9. }
  10. return 1;
  11. }
  12. if(dialogid == 422)
  13. {
  14. if(!response) return 1;
  15. if( response )
  16. {
  17. new askQ = -1;
  18.  
  19. for( new id = 1; id < MAX_ASKQS; id++ )
  20. {
  21. if( adMaskqList[ id ][ askqSend ] == false )
  22. {
  23. askQ = id;
  24. break;
  25. }
  26. }
  27.  
  28. if( askQ == -1 ) return SCM( playerid, -1, "Vec ima maksimalan broj poslatih pitanja." );
  29.  
  30. adMaskqList[ askQ ][ askqSend ] = true;
  31. adMaskqList[ askQ ][ askqID ] = playerid;
  32.  
  33. askqInfo[ playerid ][ askqSended ] = true;
  34. askqInfo[ playerid ][ askqAnswered ] = false;
  35.  
  36. strmid( adMaskqList[ askQ ][ askqOwner ], GetName( playerid ), 0, strlen( GetName( playerid ) ), 32 );
  37. strmid( adMaskqList[ askQ ][ askqQuestion ], inputtext, 0, strlen( inputtext ), 128 );
  38.  
  39. SCM( playerid, -1, "Poslao si pitanje administratorima." );
  40.  
  41. format( globalstring, sizeof( globalstring ), ""CRVENA"[Pitanje za ADMINA] %s je poslao pitanje.( /lp )", GetName( playerid ) );
  42. AdminGameMaster ( -1, globalstring );
  43. }
  44. return 1;
  45. }
  46. if(dialogid == 423)
  47. {
  48. if(!response) return 1;
  49. if( response ) {
  50. new askQ = -1;
  51.  
  52. for( new id = 1; id < MAX_ASKQS; id++ ) {
  53. if( GMaskqList[ id ][ askqSendA ] == false ) {
  54. askQ = id;
  55. break;
  56. }
  57. }
  58.  
  59. if( askQ == -1 ) return SCM( playerid, -1, "Vec ima maksimalan broj poslatih pitanja." );
  60.  
  61. GMaskqList[ askQ ][ askqSendA ] = true;
  62. GMaskqList[ askQ ][ askqIDA ] = playerid;
  63.  
  64. askqInfo[ playerid ][ askqSended ] = true;
  65. askqInfo[ playerid ][ askqAnswered ] = false;
  66.  
  67. strmid( GMaskqList[ askQ ][ askqOwnerA ], GetName( playerid ), 0, strlen( GetName( playerid ) ), 32 );
  68. strmid( GMaskqList[ askQ ][ askqQuestionA ], inputtext, 0, strlen( inputtext ), 128 );
  69.  
  70. SCM( playerid, -1, "Poslao si pitanje gamemasterima." );
  71.  
  72. format( globalstring, sizeof( globalstring ), ""CRVENA"[Pitanje za GM] %s je poslao pitanje.( /lp )", GetName( playerid ) );
  73. AdminGameMaster( -1, globalstring );
  74. }
  75. return 1;
  76. }
  77. if(dialogid == 424)
  78. {
  79. if( !response ) return true;
  80. if( response ) {
  81. listitem++;
  82. new string[ 256 ];
  83. if( adMaskqList[ listitem ][ askqSend ] == false ) return SCM( playerid, -1, "U ovom slotu nema pitanja." );
  84.  
  85. IzabraniAskQ[ playerid ] = listitem;
  86.  
  87. format( string, sizeof( string ), "Igrac %s je poslao pitanje.\n\nPitanje: %s", adMaskqList[ listitem ][ askqOwner ], adMaskqList[ listitem ][ askqQuestion ] );
  88.  
  89. SPD( playerid, 425, DSI, "Pitanje", string, "Odgovori", "Odustani" );
  90. }
  91. return 1;
  92. }
  93. if(dialogid == 425)
  94. {
  95. if( !response ) return true;
  96. if( response ) {
  97. new text[ 1280 ],srt1[ 1280 ],srt2[ 1280 ],srt3[ 1280 ];
  98. if( sscanf( inputtext, "s[128]", text ) ) return 1;
  99.  
  100. new askid = IzabraniAskQ[ playerid ];
  101.  
  102. if( adMaskqList[ askid ][ askqSend ] == false ) return SCM( playerid, -1, "U ovom slotu nema pitanja." );
  103.  
  104. adMaskqList[ askid ][ askqSend ] = false;
  105.  
  106. new id = adMaskqList[ askid ][ askqID ];
  107. IzabraniAskQ[ playerid ] = -1;
  108.  
  109. if( strcmp( GetName( id ), adMaskqList[ askid ][ askqOwner ], true ) == 0 ) {
  110.  
  111. askqInfo[ id ][ askqAnswered ] = true;
  112. strmid( askqInfo[ id ][ askqAdmin ], GetName( playerid ), 0, strlen( GetName( playerid ) ), 32 );
  113. strmid( askqInfo[ id ][ askqAnswer ], text, 0, strlen( text ), 128 );
  114. format(srt1, sizeof(srt1), ""CRVENA"[BG:RPG] "SIVA"Administrator "CRVENA"%s (ID:%d)"SIVA" je odgovorio na pitanje "CRVENA"(Pitanje ID:%d).", GetName(playerid), playerid,askid);
  115. SendAdminMessage(-1,srt1);
  116. format(srt2, sizeof(srt2), ""BELA"Poslali ste odgovor igracu (Pitanje ID:%d).", askid );
  117. SendClientMessage(playerid, -1,srt2);
  118. format(srt3, sizeof(srt3), ""BELA"Vas odgovor glasi: %s.", text);
  119. SendClientMessage(playerid, -1,srt3);
  120.  
  121. SendClientMessage( id, -1, "Admin/GameMaster je odgovorio na tvoje pitanje." );
  122. SendClientMessage( id, -1, "Da pogledate odgovor ukucajte "SIVA"'/pogledajodgovor'." );
  123.  
  124. strmid( adMaskqList[ askid ][ askqOwner ], "None", 0, strlen( "None" ), 32 );
  125. adMaskqList[ askid ][ askqID ] = -1;
  126. }
  127. else {
  128.  
  129. if( id != IPI ) {
  130. askqInfo[ id ][ askqSended ] = false;
  131. askqInfo[ id ][ askqAnswered ] = false;
  132. strmid( askqInfo[ id ][ askqAdmin ], "None", 0, strlen( "None" ), 32 );
  133. strmid( askqInfo[ id ][ askqAnswer ], "None", 0, strlen( "None" ), 128 );
  134. }
  135.  
  136. strmid( adMaskqList[ askid ][ askqOwner ], "None", 0, strlen( "None" ), 32 );
  137. adMaskqList[ askid ][ askqID ] = -1;
  138. SCM( playerid, -1, "Taj igrac nije online." );
  139. return 1;
  140. }
  141. }
  142. return 1;
  143. }
  144. if(dialogid == 8372)
  145. {
  146. if( !response ) return true;
  147. if( response ) {
  148. listitem++;
  149. new string[ 256 ];
  150. if( GMaskqList[ listitem ][ askqSendA ] == false ) return SCM( playerid, -1, "U ovom slotu nema pitanja." );
  151.  
  152. IzabraniAskQ[ playerid ] = listitem;
  153.  
  154. format( string, sizeof( string ), "Igrac %s je poslao pitanje.\n\nPitanje: %s", GMaskqList[ listitem ][ askqOwnerA ], GMaskqList[ listitem ][ askqQuestionA ] );
  155.  
  156. SPD( playerid, 8373, DSI, "Pitanje", string, "Odgovori", "Odustani" );
  157. }
  158. return 1;
  159. }
  160. if(dialogid == 8372)
  161. {
  162. if( !response ) return true;
  163. if( response ) {
  164. new text[ 128 ];
  165. if( sscanf( inputtext, "s[128]", text ) ) return 1;
  166.  
  167. new askid = IzabraniAskQ[ playerid ];
  168.  
  169. if( GMaskqList[ askid ][ askqSendA ] == false ) return SCM( playerid, -1, "U ovom slotu nema pitanja." );
  170.  
  171. GMaskqList[ askid ][ askqSendA ] = false;
  172.  
  173. new id = GMaskqList[ askid ][ askqIDA ];
  174. IzabraniAskQ[ playerid ] = -1;
  175.  
  176. if( strcmp( GetName( id ), GMaskqList[ askid ][ askqOwnerA ], true ) == 0 ) {
  177.  
  178. askqInfo[ id ][ askqAnswered ] = true;
  179. strmid( askqInfo[ id ][ askqAdmin ], GetName( playerid ), 0, strlen( GetName( playerid ) ), 32 );
  180. strmid( askqInfo[ id ][ askqAnswer ], text, 0, strlen( text ), 128 );
  181.  
  182. SendClientMessageEx( playerid, -1, "Poslali ste odgovor igracu %s.", GMaskqList[ askid ][ askqOwnerA ] );
  183. SendClientMessageEx( playerid, -1, "Vas odgovor glasi: %s.", text );
  184.  
  185. SendClientMessage( id, -1, "Admin/GM je odgovorio na tvoje pitanje." );
  186. SendClientMessage( id, -1, "Da pogledate odgovor ukucajte "SIVA"'/pogledajodgovor'." );
  187.  
  188. strmid( GMaskqList[ askid ][ askqOwnerA ], "None", 0, strlen( "None" ), 32 );
  189. GMaskqList[ askid ][ askqIDA ] = -1;
  190. }
  191. else {
  192.  
  193. if( id != IPI ) {
  194. askqInfo[ id ][ askqSended ] = false;
  195. askqInfo[ id ][ askqAnswered ] = false;
  196. strmid( askqInfo[ id ][ askqAdmin ], "None", 0, strlen( "None" ), 32 );
  197. strmid( askqInfo[ id ][ askqAnswer ], "None", 0, strlen( "None" ), 128 );
  198. }
  199.  
  200. strmid( GMaskqList[ askid ][ askqOwnerA ], "None", 0, strlen( "None" ), 32 );
  201. GMaskqList[ askid ][ askqIDA ] = -1;
  202. SCM( playerid, -1, "Taj igrac nije online." );
  203. return 1;
  204. }
  205. }
  206. return 1;
  207. }
Advertisement
Add Comment
Please, Sign In to add comment