Advertisement
Guest User

Untitled

a guest
Jan 11th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.31 KB | None | 0 0
  1. }
  2.  
  3. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  4. {
  5. //new sendername[MAX_PLAYER_NAME];
  6. //GetPlayerName(playerid, sendername, sizeof(sendername));
  7. //new string[128];
  8. if(dialogid == 1244)
  9. {
  10. if(response)
  11. {
  12. if (gPlayerAccount[playerid] != 0)
  13. {
  14. ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Welcome, Please Log-In","Type your password below to log-in","Log-in","Quit");
  15. }
  16. else
  17. {
  18. ShowPlayerDialog(playerid, 155, DIALOG_STYLE_INPUT,"Welcome, Please Register","Type your password below to register a new account.","Register","Quit");
  19. }
  20. new y, m, d;
  21. new h,mi,s;
  22. getdate(y,m,d);
  23. gettime(h,mi,s);
  24. }
  25. else
  26. {
  27. SendClientMessage(playerid, COLOR_GREY,"* You selected \"Refuse\", To play you must agree to the terms of condition");
  28. Kick(playerid);
  29. }
  30. }
  31. if(dialogid == 1245)
  32. {
  33. if(response)
  34. {
  35. strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
  36. if(!strcmp(Typed[playerid], "None", true))
  37. {
  38. ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Try Again, Please Log-In","You didn't typed a password!\nType your password below to log-in","Log-in","Quit");
  39. }
  40. else
  41. {
  42. OnPlayerLogin(playerid, inputtext);
  43. }
  44. }
  45. else
  46. {
  47. Kick(playerid);
  48. }
  49. }
  50. if(dialogid == 1246)
  51. {
  52. if(response == 1)
  53. {
  54. if(strlen(inputtext) < 3)
  55. {
  56. ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is Too Short!\nType your password below to register a new account.","Register","Quit");
  57. return 1;
  58. }
  59. if(strlen(inputtext) > 20)
  60. {
  61. ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is too Long!\nType your password below to register a new account.","Register","Quit");
  62. return 1;
  63. }
  64. OnPlayerRegister(playerid, inputtext);
  65. }
  66. else
  67. {
  68. Kick(playerid);
  69. }
  70. }
  71. }
  72. if(dialogid == 155)
  73. {
  74. if(response)
  75. {
  76. if (listitem == 0)
  77. {
  78. PlayerInfo[playerid][pSex] = 1;
  79. ShowPlayerDialog(playerid,156,DIALOG_STYLE_INPUT,"Age","How old are you?:((This is your chachter information.))","Select","Leave Game");
  80. }
  81. else if (listitem == 1)
  82. {
  83. PlayerInfo[playerid][pSex] = 2;
  84. ShowPlayerDialog(playerid,156,DIALOG_STYLE_INPUT,"Age","How old are you?:((This is your chachter information.))","Select","Leave Game");
  85. }
  86. else
  87. {
  88. Kick(playerid);
  89. }
  90. }
  91. }
  92. if(dialogid == 156)
  93. {
  94. if(response)
  95. {
  96. PlayerInfo[playerid][pAge] = strval(inputtext);
  97. new contry[] = " United States \n United Kingdom \n Canada \n Brazil \n Mexico \n Russia \n Sweden \n Denmark \n Finland \n Norway \n Germany";
  98. ShowPlayerDialog(playerid,157,DIALOG_STYLE_LIST,"Where are you from?:((This is your chachter information))",contry,"Select","Leave Game");
  99. SetPlayerPos(playerid,1291.4808,176.3004,20.4609);
  100. }
  101. else
  102. {
  103. Kick(playerid);
  104. }
  105. }
  106. if(dialogid == 157)
  107. {
  108. if(response)
  109. {
  110. if (listitem == 0)
  111. {
  112. PlayerInfo[playerid][pOrigin] = 1;
  113. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from the United States.");
  114. TogglePlayerControllable(playerid, 0);
  115. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  116. }
  117. else if (listitem == 1)
  118. {
  119. PlayerInfo[playerid][pOrigin] = 2;
  120. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from United Kingdom.");
  121. TogglePlayerControllable(playerid, 0);
  122. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  123. }
  124. else if (listitem == 2)
  125. {
  126. PlayerInfo[playerid][pOrigin] = 3;
  127. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Canada.");
  128. TogglePlayerControllable(playerid, 0);
  129. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  130. }
  131. else if (listitem == 3)
  132. {
  133. PlayerInfo[playerid][pOrigin] = 4;
  134. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Brazil.");
  135. TogglePlayerControllable(playerid, 0);
  136. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  137. }
  138. else if (listitem == 4)
  139. {
  140. PlayerInfo[playerid][pOrigin] = 5;
  141. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Mexico.");
  142. TogglePlayerControllable(playerid, 0);
  143. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  144. }
  145. else if (listitem == 5)
  146. {
  147. PlayerInfo[playerid][pOrigin] = 5;
  148. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Russia.");
  149. TogglePlayerControllable(playerid, 0);
  150. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  151. }
  152. else if (listitem == 6)
  153. {
  154. PlayerInfo[playerid][pOrigin] = 6;
  155. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Sweden.");
  156. TogglePlayerControllable(playerid, 0);
  157. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  158. }
  159. else if (listitem == 7)
  160. {
  161. PlayerInfo[playerid][pOrigin] = 7;
  162. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Denmark.");
  163. TogglePlayerControllable(playerid, 0);
  164. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  165. }
  166. else if (listitem == 8)
  167. {
  168. PlayerInfo[playerid][pOrigin] = 8;
  169. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Finland.");
  170. TogglePlayerControllable(playerid, 0);
  171. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  172. }
  173. else if (listitem == 9)
  174. {
  175. PlayerInfo[playerid][pOrigin] = 9;
  176. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Norway.");
  177. TogglePlayerControllable(playerid, 0);
  178. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  179. }
  180. else if (listitem == 10)
  181. {
  182. PlayerInfo[playerid][pOrigin] = 10;
  183. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Germany.");
  184. TogglePlayerControllable(playerid, 0);
  185. ShowPlayerDialog(playerid, RP, DIALOG_STYLE_LIST,"What does RP stand for?","1.Roleplay\n2.Ruleplay\n3.Rapeplay","Choose","");
  186. }
  187. }
  188. else
  189. {
  190. Kick(playerid);
  191. }
  192. }
  193. if(dialogid == RP)
  194. {
  195. if(response)
  196. {
  197. if(listitem == 0)
  198. {
  199. SendClientMessage(playerid, COLOR_WHITE, "Correct! Moving on!");
  200. ShowPlayerDialog(playerid, RP1, DIALOG_STYLE_LIST, "What does the term Metagame mean?","1.Use IC information OOCly\n2.Force someone to roleplay\n3.Use OOC information icly","Choose","");
  201. }
  202. if(listitem == 1)
  203. {
  204. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked!");
  205. Kick(playerid);
  206. }
  207. if(listitem == 2)
  208. {
  209. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked");
  210. Kick(playerid);
  211. }
  212. }
  213. }
  214. if(dialogid == RP1)
  215. {
  216. if(response)
  217. {
  218. if(listitem == 0)
  219. {
  220. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked");
  221. Kick(playerid);
  222. }
  223. if(listitem == 1)
  224. {
  225. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked");
  226. Kick(playerid);
  227. }
  228. if(listitem == 2)
  229. {
  230. SendClientMessage(playerid, COLOR_WHITE, "Correct! Moving on!");
  231. ShowPlayerDialog(playerid, RP2, DIALOG_STYLE_LIST, "What does the term PowerGame mean?","1.Forcing Someone to Roleplay\n2.Killing someone with a car\n3.Killing someone for no reason","Choose","");
  232. }
  233. }
  234. }
  235. if(dialogid == RP2)
  236. {
  237. if(response)
  238. {
  239. if(listitem == 0)
  240. {
  241. SendClientMessage(playerid, COLOR_WHITE, "Correct! Moving on!");
  242. ShowPlayerDialog(playerid, RP3, DIALOG_STYLE_LIST, "What does the term Deathmatch mean?","You get killed, then you go back and kill him\nKilling someone for no reason\nKilling yourself","Choose","");
  243. }
  244. if(listitem == 1)
  245. {
  246. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked");
  247. Kick(playerid);
  248. }
  249. if(listitem == 2)
  250. {
  251. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked");
  252. Kick(playerid);
  253. }
  254. }
  255. }
  256. if(dialogid == RP3)
  257. {
  258. if(response)
  259. {
  260. if(listitem == 0)
  261. {
  262. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked");
  263. Kick(playerid);
  264. }
  265. if(listitem == 1)
  266. {
  267. SendClientMessage(playerid, COLOR_WHITE, "Correct! Moving on!");
  268. ShowPlayerDialog(playerid, RP4, DIALOG_STYLE_LIST, "What is the proper use of advert?","I selling good stuff\nI selling sex /pm me.\nSelling a new Landstalker for 15 grand","Choose","Leave");
  269. }
  270. if(listitem == 2)
  271. {
  272. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked");
  273. Kick(playerid);
  274. }
  275. }
  276. }
  277. if(dialogid == RP4)
  278. {
  279. if(response)
  280. {
  281. if(listitem == 0)
  282. {
  283. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked");
  284. Kick(playerid);
  285. }
  286. if(listitem == 1)
  287. {
  288. SendClientMessage(playerid, COLOR_RED, "Incorrect! Kicked");
  289. Kick(playerid);
  290. }
  291. if(listitem == 2)
  292. {
  293. SendClientMessage(playerid, COLOR_GREEN, "Welcome to our server if you need help use /n to talk too all use /o!");
  294. RegistrationStep[playerid] = 0;
  295. PlayerInfo[playerid][pTut] = 1;
  296. TogglePlayerControllable(playerid, 1);
  297. SetCameraBehindPlayer(playerid);
  298. SetPlayerSpawn(playerid);
  299. gPlayerLogged{playerid} = 1;
  300. SetPlayerPos(playerid,1291.4808,176.3004,20.4609);
  301. }
  302. }
  303. return 1;
  304. }
  305. } // End OnDialogResponse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement