tutorial.pwn 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943
  1. /*
  2. /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
  3. | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
  4. | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
  5. | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
  6. | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
  7. | $$\ $$$| $$ \ $$ | $$ \ $$| $$
  8. | $$ \ $$| $$$$$$/ | $$ | $$| $$
  9. |__/ \__/ \______/ |__/ |__/|__/
  10. Tutorial System
  11. Winterfield
  12. Next Generation Gaming, LLC
  13. (created by Next Generation Gaming Development Team)
  14. * Copyright (c) 2016, Next Generation Gaming, LLC
  15. *
  16. * All rights reserved.
  17. *
  18. * Redistribution and use in source and binary forms, with or without modification,
  19. * are not permitted in any case.
  20. *
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  25. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  26. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  27. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  28. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  29. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  30. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  31. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. #include <YSI\y_hooks>
  35. new TutorialTime[MAX_PLAYERS];
  36. AdvanceTutorial(playerid)
  37. {
  38. switch(PlayerInfo[playerid][pTut])
  39. {
  40. case -1:
  41. {
  42. TogglePlayerSpectating(playerid, false);
  43. SetPlayerPos(playerid, 1715.0687, -1899.5597, 13.5665);
  44. SetPlayerFacingAngle(playerid, 0);
  45. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  46. SetPlayerInterior(playerid, 0);
  47. SetPlayerVirtualWorld(playerid, 0);
  48. SetHealth(playerid, 100);
  49. ClearChatbox(playerid);
  50. }
  51. case 0:
  52. {
  53. IsSpawned[playerid] = 1;
  54. ClearChatbox(playerid);
  55. TogglePlayerSpectating(playerid, 1);
  56. SetPlayerInterior(playerid, 0);
  57. SetPlayerVirtualWorld(playerid, playerid + 1);
  58. InterpolateCameraPos(playerid, 1333.5521, -1388.1493, 67.2808, 1387.4829, -923.4698, 90.6020, 8000, CAMERA_MOVE);
  59. InterpolateCameraLookAt(playerid, 1333.5950, -1387.1521, 67.3258, 1387.7191, -922.5004, 90.4920, 8000, CAMERA_MOVE);
  60. KillTimer(TutorialTime[playerid]);
  61. SetPVarInt(playerid, "pTutorialTimer", 15);
  62. TutorialTime[playerid] = SetTimerEx("TutorialTimer", 1000, true, "i", playerid);
  63. ShowTutorialDialog(playerid, 0);
  64. }
  65. case 1:
  66. {
  67. InterpolateCameraPos(playerid, 725.9147, -1610.8770, 3.0359, 734.8999, -1962.6320, -6.3299, 8000, CAMERA_MOVE);
  68. InterpolateCameraLookAt(playerid, 725.9500, -1611.8734, 3.0057, 734.9311, -1963.6292, -6.5201, 8000, CAMERA_MOVE);
  69. KillTimer(TutorialTime[playerid]);
  70. SetPVarInt(playerid, "pTutorialTimer", 8);
  71. TutorialTime[playerid] = SetTimerEx("TutorialTimer", 1000, true, "i", playerid);
  72. ShowTutorialDialog(playerid, 1);
  73. }
  74. case 2:
  75. {
  76. InterpolateCameraPos(playerid, 1104.7491, -1401.8911, 14.6202, 1145.8008, -1471.2203, 27.1695, 8000, CAMERA_MOVE);
  77. InterpolateCameraLookAt(playerid, 1105.5040, -1402.5443, 14.5450, 1145.2341, -1470.3988, 26.7043, 8000, CAMERA_MOVE);
  78. KillTimer(TutorialTime[playerid]);
  79. SetPVarInt(playerid, "pTutorialTimer", 8);
  80. TutorialTime[playerid] = SetTimerEx("TutorialTimer", 1000, true, "i", playerid);
  81. ShowTutorialDialog(playerid, 2);
  82. }
  83. case 3:
  84. {
  85. InterpolateCameraPos(playerid, 1517.0358, -1616.2576, 17.8788, 1520.4496, -1715.3738, 18.1261, 15000, CAMERA_MOVE);
  86. InterpolateCameraLookAt(playerid, 1517.4991, -1617.1411, 17.8737, 1521.0973, -1714.6147, 18.0459, 15000, CAMERA_MOVE);
  87. KillTimer(TutorialTime[playerid]);
  88. SetPVarInt(playerid, "pTutorialTimer", 15);
  89. TutorialTime[playerid] = SetTimerEx("TutorialTimer", 1000, true, "i", playerid);
  90. ShowTutorialDialog(playerid, 3);
  91. }
  92. case 4:
  93. {
  94. InterpolateCameraPos(playerid, 938.9750, -1324.3108, 14.0205, 1039.5808, -1324.3224, 14.4793, 8000, CAMERA_MOVE);
  95. InterpolateCameraLookAt(playerid, 939.9739, -1324.3015, 14.0254, 1040.5797, -1324.3134, 14.4891, 8000, CAMERA_MOVE);
  96. KillTimer(TutorialTime[playerid]);
  97. SetPVarInt(playerid, "pTutorialTimer", 8);
  98. TutorialTime[playerid] = SetTimerEx("TutorialTimer", 1000, true, "i", playerid);
  99. ShowTutorialDialog(playerid, 4);
  100. }
  101. case 5:
  102. {
  103. InterpolateCameraPos(playerid, 366.2238, -1798.2668, 9.5036, 369.1093, -2030.7736, 8.7837, 8000, CAMERA_MOVE);
  104. InterpolateCameraLookAt(playerid, 366.3326, -1799.2593, 9.5184, 369.2533, -2031.7618, 8.7687, 8000, CAMERA_MOVE);
  105. ShowTutorialDialog(playerid, 5);
  106. }
  107. case 6 .. 10: ShowTutorialDialog(playerid, PlayerInfo[playerid][pTut]);
  108. case 11:
  109. {
  110. InterpolateCameraPos(playerid, 1457.7699, -870.9628, 63.1767, 1525.9520, -805.8469, 72.9416, 8000, CAMERA_MOVE);
  111. InterpolateCameraLookAt(playerid, 1458.4862, -870.2654, 63.1212, 1526.6012, -805.0862, 72.9162, 8000, CAMERA_MOVE);
  112. ShowTutorialDialog(playerid, 11);
  113. SetPlayerInterior(playerid, 0);
  114. }
  115. case 12:
  116. {
  117. InterpolateCameraPos(playerid, 1569.0149, -1812.5513, 16.1676, 1568.5962, -1889.8837, 13.8242, 8000, CAMERA_MOVE);
  118. InterpolateCameraLookAt(playerid, 1569.0370, -1813.5509, 16.1273, 1568.5488, -1890.8818, 13.7888, 8000, CAMERA_MOVE);
  119. ShowTutorialDialog(playerid, 12);
  120. }
  121. case 13:
  122. {
  123. AdjustActor(playerid, 2);
  124. CharacterCreation(playerid);
  125. InterpolateCameraPos(playerid, 237.6108, 1822.9670, 7.8454, 224.6772, 1820.0587, 7.6625, 5000, CAMERA_MOVE);
  126. InterpolateCameraLookAt(playerid, 236.6068, 1822.9495, 7.7454, 223.7760, 1820.5018, 7.6224, 5000, CAMERA_MOVE);
  127. SetPlayerInterior(playerid, 0);
  128. }
  129. case 14: CharacterCreation(playerid);
  130. case 15:
  131. {
  132. if(IsSpawned[playerid] == 0) return 1;
  133. SendClientMessageEx(playerid, COLOR_GREY, "-----------------------------");
  134. SendClientMessageEx(playerid, COLOR_WHITE, "Objective: Purchase a vehicle.");
  135. SendClientMessageEx(playerid, COLOR_WHITE, "Head the checkpoint on your map to purchase a vehicle.");
  136. SendClientMessageEx(playerid, COLOR_GREY, "-----------------------------");
  137. SetPlayerCheckpoint(playerid, 1645.9091,-1897.6914,13.5521, 5.0);
  138. }
  139. case 16:
  140. {
  141. if(IsSpawned[playerid] == 0) return 1;
  142. SendClientMessageEx(playerid, COLOR_GREY, "-----------------------------");
  143. SendClientMessageEx(playerid, COLOR_WHITE, "Objective: Withdraw money from the bank.");
  144. SendClientMessageEx(playerid, COLOR_WHITE, "Head the checkpoint on your map to withdraw money.");
  145. SendClientMessageEx(playerid, COLOR_GREY, "-----------------------------");
  146. SetPlayerCheckpoint(playerid, 1457.0022,-1011.3710,26.8438, 5.0);
  147. }
  148. case 17:
  149. {
  150. if(IsSpawned[playerid] == 0) return 1;
  151. SendClientMessageEx(playerid, COLOR_GREY, "-----------------------------");
  152. SendClientMessageEx(playerid, COLOR_WHITE, "Objective: Buy a phone.");
  153. SendClientMessageEx(playerid, COLOR_WHITE, "Head the checkpoint on your map to purchase a phone.");
  154. SendClientMessageEx(playerid, COLOR_GREY, "-----------------------------");
  155. SetPlayerCheckpoint(playerid, 999.6548,-919.9871,42.3281, 5.0);
  156. }
  157. case 18:
  158. {
  159. if(IsSpawned[playerid] == 0) return 1;
  160. SendClientMessageEx(playerid, COLOR_GREY, "-----------------------------");
  161. SendClientMessageEx(playerid, COLOR_WHITE, "You have completed the objectives tutorial. Welcome to Los Angeles County RolePlay!");
  162. SendClientMessageEx(playerid, COLOR_GREY, "-----------------------------");
  163. PlayerInfo[playerid][pTut] = -1;
  164. }
  165. }
  166. return 1;
  167. }
  168. CharacterCreation(playerid)
  169. {
  170. switch(PlayerInfo[playerid][pTut])
  171. {
  172. case 13:
  173. {
  174. szMiscArray[0] = 0;
  175. new genderstring[12];
  176. switch(PlayerInfo[playerid][pSex])
  177. {
  178. case 1: genderstring = "Male";
  179. case 2: genderstring = "Female";
  180. default: genderstring = "Unspecified";
  181. }
  182. format(szMiscArray, sizeof(szMiscArray), "Name:\t%s\n\
  183. Gender:\t%s\n\
  184. Date of Birth\t%s\n\
  185. Nation\t%s\n\
  186. Accent:\t%s\n\
  187. Skin ID:\t%i\n\
  188. Complete",
  189. GetPlayerNameEx(playerid),
  190. genderstring,
  191. PlayerInfo[playerid][pBirthDate],
  192. GetPlayerNation(playerid),
  193. GetPlayerAccent(playerid),
  194. PlayerInfo[playerid][pModel]);
  195. return ShowPlayerDialogEx(playerid, DIALOG_REGISTER_CREATION, DIALOG_STYLE_TABLIST, "LACO-RP | Character Creation", szMiscArray, "Select", "");
  196. }
  197. case 14: {
  198. DestroyActor(GetPVarInt(playerid, "pActor"));
  199. TogglePlayerSpectating(playerid, false);
  200. SetPlayerPos(playerid, 1715.0687, -1899.5597, 13.5665);
  201. SetPlayerFacingAngle(playerid, 0);
  202. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  203. SetPlayerInterior(playerid, 0);
  204. SetPlayerVirtualWorld(playerid, 0);
  205. SetHealth(playerid, 100);
  206. ClearChatbox(playerid);
  207. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP Tutorial - Welcome", "Would you like to have the server provide you with objectives to guide you around the server?", "Yes, please!", "No, thanks.");
  208. }
  209. }
  210. return 1;
  211. }
  212. ShowTutorialDialog(playerid, stage)
  213. {
  214. new countstring[10];
  215. if(GetPVarInt(playerid, "pTutorialTimer") == 0) { format(countstring, 10, "Continue"); }
  216. else valstr(countstring, GetPVarInt(playerid, "pTutorialTimer"));
  217. switch(stage)
  218. {
  219. case 0:
  220. {
  221. if(betaserver == 0) {
  222. szMiscArray = "{FFFFFF}_______________________________________________________________________________________________________________________________________________________\n\n\n";
  223. strcat(szMiscArray, "{7091B8}Welcome to Mountain Roleplay!{FFFFFF}\n\n");
  224. strcat(szMiscArray, "We are an english speaking community. At LACO-RP, we specialize in Roleplay, the act of taking on the role of a character and acting as that character\n");
  225. strcat(szMiscArray, "as you would in real life. Along the way your character learns new information and allows them to develop.\n\n");
  226. strcat(szMiscArray, "{FF0000}LACO-RP Related Services{FFFFFF}:\n");
  227. strcat(szMiscArray, "\t{F69500}Website{FFFFFF}: www.laco-rp.com - Sign up on our forums and interact with the community!\n");
  228. strcat(szMiscArray, "Please make sure you read this tutorial as you will be asked questions at the end.");
  229. strcat(szMiscArray, "\n\n\n{FFFFFF}_______________________________________________________________________________________________________________________________________________________");
  230. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP Tutorial - Welcome", szMiscArray, countstring, "");
  231. }
  232. else {
  233. szMiscArray = "{FFFFFF}___________________________________________________________________________________________\n\n\n";
  234. strcat(szMiscArray, "{7091B8}Welcome to Mountain Roleplay Beta Server!{FFFFFF}\n\n");
  235. strcat(szMiscArray, "You are not required to sit through the tutorial, please just press \"Got it\" at the bottom.\n");
  236. strcat(szMiscArray, "You'll be taken stright to the character creation screen.\n\n");
  237. strcat(szMiscArray, "\n\n\n{FFFFFF}_______________________________________________________________________________");
  238. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP Beta Server - Welcome", szMiscArray, "Got It", "");
  239. }
  240. }
  241. case 1:
  242. {
  243. szMiscArray = "{FFFFFF}_______________________________________________________________________________________________________________________________________________________\n\n\n";
  244. strcat(szMiscArray, "{F69500}Roleplay{FFFFFF}\n\n");
  245. strcat(szMiscArray, "In order to roleplay, you should create a character. Every character should have a story, every character needs a story! Who are they? Where do\n");
  246. strcat(szMiscArray, "they come from? Why are they in San Andreas? That's all up to you!\n\n");
  247. strcat(szMiscArray, "But first you should get to know some of the terminology we use at Mountain Roleplay.\n\n");
  248. strcat(szMiscArray, "\t{FF0000}In Character (IC){FFFFFF}: Anything that constitutes your character, or involves them. This is accomponied by the in-game text chat, radio's, cell phones, etc.\n");
  249. strcat(szMiscArray, "\t\tExample: Your character is talking to another character. You might say \"Hi, what's your name?\" This conversation is in character.\n\n");
  250. strcat(szMiscArray, "\t{FF0000}Out Of Character (OOC){FFFFFF}: This is you speaking, not your character! Anything that has to do with you personally is considered out of character. Out of\n");
  251. strcat(szMiscArray, "\tCharacter should always be present with 'OOC Brackets', in other words: (( This chat is now OOC because of the double parenthesis )).\n");
  252. strcat(szMiscArray, "\t\tExample: You are talking to your friend about the football game last night. You might say, \"(( Did you see that amazing catch? ))\". This\n");
  253. strcat(szMiscArray, "\t\tis considered out of character because of the use of 'OOC Brackets'.\n\n");
  254. strcat(szMiscArray, "You should also learn the two most commonly used commands to perform roleplay.\n\n");
  255. strcat(szMiscArray, "\t{FF0000}/me [action]{FFFFFF} - This allows your character to perform an action or statement, it will broadcast a local message to other players around you.\n");
  256. strcat(szMiscArray, "\t\tExample: /me picks up a stick from the ground.\n");
  257. strcat(szMiscArray, "\t{FF0000}/do [action]{FFFFFF} - This command describes an action or statement, it's also used to gain information in character'ly about other characters.\n");
  258. strcat(szMiscArray, "\t\tExample: /do The stick is brown.\n\n");
  259. strcat(szMiscArray, "Please read these definitions carefully as you will be quizzed on them afterwards.");
  260. strcat(szMiscArray, "\n\n\n{FFFFFF}_______________________________________________________________________________________________________________________________________________________");
  261. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP Tutorial - Roleplay", szMiscArray, countstring, "");
  262. }
  263. case 2:
  264. {
  265. szMiscArray = "{FFFFFF}_______________________________________________________________________________________________________________________________________________________\n\n\n";
  266. strcat(szMiscArray, "{F69500}Rules{FFFFFF}\n\n");
  267. strcat(szMiscArray, "Next, you should learn some common roleplay rules that are vital in ensuring you have the best possible experience on LACO-RP.\n\n");
  268. strcat(szMiscArray, "\t{FF0000}Metagaming (MG){FFFFFF}: Mixing IC information with OOC information, or vice versa.\n");
  269. strcat(szMiscArray, "\t\tExample: John_Doe doesn't know Jane_Doe, but he reports a crime she's commited to the police and tells the officer her name is Jane_Doe.\n");
  270. strcat(szMiscArray, "\t\tExample: John_Doe is really upset, so he decides to put a frowny face in the in character chat.\n\n");
  271. strcat(szMiscArray, "\t{FF0000}Powergaming (PG){FFFFFF}: Forcing another player into roleplay, or roleplaying the impossible.\n");
  272. strcat(szMiscArray, "\t\tExample: John_Doe uses the command /tie on Jane_Doe, without roleplaying it first, or giving her sufficient time to respond.\n\n");
  273. strcat(szMiscArray, "\t{FF0000}Deathmatching (DM){FFFFFF}: Attempting to kill another player without a sufficient roleplay reason.\n");
  274. strcat(szMiscArray, "\t\tExample: John_Doe goes up to Jane_Doe and begins to shoot at her even though they've never met.\n\n");
  275. strcat(szMiscArray, "\t{FF0000}Killing On Sight (KoS){FFFFFF}: Attempting to kill another player without sufficient roleplay done beforehand.\n");
  276. strcat(szMiscArray, "\t\tExample: John_Doe goes up to Jane_Doe and begins to shoot at her after she stole his car without roleplaying it first.\n\n");
  277. strcat(szMiscArray, "\t{FF0000}Revenge Killing (RK){FFFFFF}: Returning to the last place you died or engaging roleplay with the person(s) who were responsible for your death.\n");
  278. strcat(szMiscArray, "\t\tExample: Jane_Doe kills John_Doe, John_Doe goes back up to Jane_Doe and roleplays killing her.\n\n");
  279. strcat(szMiscArray, "Please read these rules carefully as you will be quizzed on them afterwards, and you may be punished if you break one!");
  280. strcat(szMiscArray, "\n\n\n{FFFFFF}_______________________________________________________________________________________________________________________________________________________");
  281. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP Tutorial - Rules", szMiscArray, countstring, "");
  282. }
  283. case 3:
  284. {
  285. szMiscArray = "{FFFFFF}_______________________________________________________________________________________________________________________________________________________\n\n\n";
  286. strcat(szMiscArray, "{F69500}Groups{FFFFFF}\n\n");
  287. strcat(szMiscArray, "It's fun to be a civilian, but it's more fun to join a group.\n\n");
  288. strcat(szMiscArray, "\tAt Los Angeles County Roleplay, we offer more of a diverse selection of groups that players can join. There are many different types of groups:\n");
  289. strcat(szMiscArray, "\t{FF0000}Government (GOV){FFFFFF}: The government imposes new laws and manages the budget of San Andreas.\n");
  290. strcat(szMiscArray, "\t{FF0000}Judicial (JUD){FFFFFF}: They manage the constitution of San Andreas and manage court cases against people and agencies.\n");
  291. strcat(szMiscArray, "\t{FF0000}Law Enforcement Agency (LEA){FFFFFF}: They enfroce the laws written by the government and arrest violators of the law.\n");
  292. strcat(szMiscArray, "\t{FF0000}Medic (MED){FFFFFF}: The medics respond to distress calls of those in need and bring them to the hospital.\n");
  293. strcat(szMiscArray, "\t{FF0000}News Agency{FFFFFF}: News reporters will broadcast live news to the whole server regarding different incidents daily.\n");
  294. strcat(szMiscArray, "\t{FF0000}Towing & Reposession{FFFFFF}: They go around San Andreas towing illegally parked cars or ones with outstanding tickets, impounding them.\n");
  295. strcat(szMiscArray, "\t{FF0000}Transportation{FFFFFF}: They taxi around individuals who service them in exchange for a small fee.\n");
  296. strcat(szMiscArray, "\t{FF0000}Contract Agency{FFFFFF}: They perform illegal contract hits on those who have them.\n");
  297. strcat(szMiscArray, "\t{FF0000}Criminal{FFFFFF}: A group of criminals who do illegal things.\n\n");
  298. strcat(szMiscArray, "Some groups allow you to apply to join them once you meet certain requirements! Check out all the groups at www.laco-rp.com.");
  299. strcat(szMiscArray, "\n\n\n{FFFFFF}_______________________________________________________________________________________________________________________________________________________");
  300. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP Tutorial - Groups", szMiscArray, countstring, "");
  301. }
  302. case 4:
  303. {
  304. szMiscArray = "{FFFFFF}_______________________________________________________________________________________________________________________________________________________\n\n\n";
  305. strcat(szMiscArray, "{F69500}Property{FFFFFF}\n\n");
  306. strcat(szMiscArray, "Players can own different property around the server, some cost more than others. Properties are meant to enhance your roleplay experience.\n\n");
  307. strcat(szMiscArray, "\tThere are several different types of properties:\n");
  308. strcat(szMiscArray, "\t{FF0000}Housing{FFFFFF}: Represented by a green icon, houses are everywhere around the server.\n");
  309. strcat(szMiscArray, "\t{FF0000}Businesses{FFFFFF}: These are represented by a variety of different icons depending upon their type, but these allow you to purchase different things.\n");
  310. strcat(szMiscArray, "\t{FF0000}Doors{FFFFFF}: Used for any purpose, they have an exterior and an interior and are typically marked by a floating downwards arrow but can have different icons.\n");
  311. strcat(szMiscArray, "\t{FF0000}Garages{FFFFFF}: These are used for entering and exiting with a vehicle and are represented by a text label marked \"Garage\".\n");
  312. strcat(szMiscArray, "\t{FF0000}Vehicles{FFFFFF}: Players may purchase vehicles from dealerships at any time, and use them when they wish.\n\n");
  313. strcat(szMiscArray, "You can enter and exit property by pressing 'N' on your keyboard when near the icon.");
  314. strcat(szMiscArray, "\n\n\n{FFFFFF}_______________________________________________________________________________________________________________________________________________________");
  315. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP Tutorial - Groups", szMiscArray, countstring, "");
  316. }
  317. case 5:
  318. {
  319. szMiscArray = "{FFFFFF}_______________________________________________________________________________________________________________________________________________________\n\n\n";
  320. strcat(szMiscArray, "{F69500}Finished{FFFFFF}\n\n");
  321. strcat(szMiscArray, "We are now finished with the tutorial. You will now be quizzed on many of the aspects covered in the tutorial.\n\n");
  322. strcat(szMiscArray, "\tIf you feel you are not ready to take the quiz, you make repeat the tutorial by pressing \"Repeat\". Otherwise, hit \"Continue\".\n");
  323. strcat(szMiscArray, "\tIf you get any question wrong, you will be forced to retake the tutorial and will be quizzed again afterwards.\n\n");
  324. strcat(szMiscArray, "{FF0000}What would you like to do?{FFFFFF}");
  325. strcat(szMiscArray, "\n\n\n{FFFFFF}_______________________________________________________________________________________________________________________________________________________");
  326. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP Tutorial - Groups", szMiscArray, "Continue", "Repeat");
  327. }
  328. case 6:
  329. {
  330. SetPlayerCameraPos(playerid, -2026.9594, -117.1733, 1036.1282);
  331. SetPlayerCameraLookAt(playerid, -2026.5365, -116.2688, 1035.9733);
  332. SetPlayerInterior(playerid, 3);
  333. SendClientMessage(playerid, -1, "You are now in the tutorial. Read the questions & answers carefully. If you miss one question, you will be forced to repeat the tutorial!");
  334. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_LIST, "What is the correct way to write an out of character statement?", "Writing it in the chat box.\n\"Putting quotes around it\".\n(( Using double parenthesis. ))", "Continue", "");
  335. }
  336. case 7: ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_LIST, "What is the definition of {FF0000}Metagaming?", "Mixing IC information with OOC information.\nPlaying more than one game at one time.\nForcing another player into a roleplay situation.", "Continue", "");
  337. case 8: ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_LIST, "What is the definition of {FF0000}Powergaming?", "Logging in with one or more account at the same time.\nPlaying more than one game at one time.\nForcing another player into a roleplay situation.", "Continue", "");
  338. case 9: ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_LIST, "What is the definition of {FF0000}Deathmatching?", "Killing yourself to avoid a situation.\nWhen you run away from the police.\nKilling a person without proper roleplay reason.", "Continue", "");
  339. case 10: ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_LIST, "What is the definition of {FF0000}Killing on Sight?", "Killing yourself to avoid a situation.\nKilling someone without proper roleplay done prior.\nKilling a police officer.", "Continue", "");
  340. case 11:
  341. {
  342. szMiscArray = "{FFFFFF}_______________________________________________________________________________________________________________________________________________________\n\n\n";
  343. strcat(szMiscArray, "{F69500}Useful Commands{FFFFFF}\n\n");
  344. strcat(szMiscArray, "At Mountain Roleplay, we have a lot of commands you can use to enhance your experience. You may use /help to refer to some of these.\n\n");
  345. strcat(szMiscArray, "\t{FF0000}/newb(ie){FFFFFF} - Ask a question, and one of our Advisors will answer it!\n");
  346. strcat(szMiscArray, "\t{FF0000}/(cancel)report{FFFFFF} - Contact an administrator if you need one or report another player for breaking the rules.\n");
  347. strcat(szMiscArray, "\t{FF0000}/stats{FFFFFF} - View various information attached to your account.\n");
  348. strcat(szMiscArray, "\t{FF0000}/inv(entory){FFFFFF} - Find out how much of each item you have in your inventory.\n");
  349. strcat(szMiscArray, "\t{FF0000}/interact{FFFFFF} - Interact with another player by giving/selling items, etc. (You may also use RMB+Y over a player to perform this)\n");
  350. strcat(szMiscArray, "\t{FF0000}/pay{FFFFFF} - Pay another player a certain amount of money.\n");
  351. strcat(szMiscArray, "\n\n\n{FFFFFF}_______________________________________________________________________________________________________________________________________________________");
  352. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP Tutorial - Commands", szMiscArray, "Continue", "");
  353. }
  354. case 12:
  355. {
  356. szMiscArray = "{FFFFFF}_______________________________________________________________________________________________________________________________________________________\n\n\n";
  357. strcat(szMiscArray, "You are now completely finished with the tutorial. Press the next button to be taken to the character creation menu.\n\n");
  358. strcat(szMiscArray, "\t{F69521}Developers\n");
  359. strcat(szMiscArray, "\t\t{F69521}Director of Development{FFFFFF}:\n\t\t\tShane\n\n");
  360. strcat(szMiscArray, "\t\t{F69521}Developers{FFFFFF}:\n\
  361. \t\t\tMiguel\n\
  362. \t\t\tFarva\n\
  363. \t\t\tHector\n\
  364. \t\t\tThomas\n\
  365. \t\t{F69500}Past Developers{FFFFFF}:\n\
  366. \t\t\tAkatony\tJohn\t\tBrendan\n\
  367. \t\t\tBrian\t\tScott\t\tGhoulSlayer\n\
  368. \t\t\tZhao\t\tDonuts\t\tMo Cena\n\
  369. \t\t\tCalgon\t\tNeo\t\tThomasJ\n\
  370. \t\t\tBeren\t\tKareemtastic\tSew Sumi\n\
  371. \t\t\tRazbit\t\tAlexR\t\tAustin\n\
  372. \t\t\tDom\t\tRothschild\tWinterfield\n\
  373. \t\t\tJingles\tBehemoth\tWesten\n\
  374. \t\t\tConnolly\n");
  375. strcat(szMiscArray, "\n\n{FFFFFF}_______________________________________________________________________________________________________________________________________________________");
  376. ShowPlayerDialogEx(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_MSGBOX, "LACO-RP - Developers", szMiscArray, "Continue", "");
  377. }
  378. }
  379. return 1;
  380. }
  381. hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
  382. if(arrAntiCheat[playerid][ac_iFlags][AC_DIALOGSPOOFING] > 0) return 1;
  383. switch(dialogid)
  384. {
  385. case DIALOG_TUTORIAL:
  386. {
  387. switch(PlayerInfo[playerid][pTut])
  388. {
  389. case 0 .. 4:
  390. {
  391. if(betaserver == 0) {
  392. if(GetPVarInt(playerid, "pTutorialTimer") != 0) return ShowTutorialDialog(playerid, PlayerInfo[playerid][pTut]);
  393. else
  394. {
  395. PlayerInfo[playerid][pTut]++;
  396. AdvanceTutorial(playerid);
  397. }
  398. } else {
  399. PlayerInfo[playerid][pTut] = 13;
  400. AdvanceTutorial(playerid);
  401. }
  402. }
  403. case 5:
  404. {
  405. if(!response)
  406. {
  407. PlayerInfo[playerid][pTut] = 0;
  408. AdvanceTutorial(playerid);
  409. SendClientMessage(playerid, -1, "You have decided to repeat the tutorial. Please make sure to read everything carefully before moving on!");
  410. }
  411. else
  412. {
  413. PlayerInfo[playerid][pTut]++;
  414. AdvanceTutorial(playerid);
  415. }
  416. }
  417. case 6:
  418. {
  419. if(!response) return AdvanceTutorial(playerid);
  420. switch(listitem)
  421. {
  422. case 0, 1:
  423. {
  424. PlayerInfo[playerid][pTut] = 0;
  425. AdvanceTutorial(playerid);
  426. SendClientMessage(playerid, -1, "That's the wrong answer! You now have to retake the tutorial. Please pay more attention this time!");
  427. }
  428. default:
  429. {
  430. PlayerInfo[playerid][pTut]++;
  431. AdvanceTutorial(playerid);
  432. }
  433. }
  434. }
  435. case 7:
  436. {
  437. if(!response) return AdvanceTutorial(playerid);
  438. switch(listitem)
  439. {
  440. case 1, 2:
  441. {
  442. PlayerInfo[playerid][pTut] = 0;
  443. AdvanceTutorial(playerid);
  444. SendClientMessage(playerid, -1, "That's the wrong answer! You now have to retake the tutorial. Please pay more attention this time!");
  445. }
  446. default:
  447. {
  448. PlayerInfo[playerid][pTut]++;
  449. AdvanceTutorial(playerid);
  450. }
  451. }
  452. }
  453. case 8:
  454. {
  455. if(!response) return AdvanceTutorial(playerid);
  456. switch(listitem)
  457. {
  458. case 0, 1:
  459. {
  460. PlayerInfo[playerid][pTut] = 0;
  461. AdvanceTutorial(playerid);
  462. SendClientMessage(playerid, -1, "That's the wrong answer! You now have to retake the tutorial. Please pay more attention this time!");
  463. }
  464. default:
  465. {
  466. PlayerInfo[playerid][pTut]++;
  467. AdvanceTutorial(playerid);
  468. }
  469. }
  470. }
  471. case 9:
  472. {
  473. if(!response) return AdvanceTutorial(playerid);
  474. switch(listitem)
  475. {
  476. case 0, 1:
  477. {
  478. PlayerInfo[playerid][pTut] = 0;
  479. AdvanceTutorial(playerid);
  480. SendClientMessage(playerid, -1, "That's the wrong answer! You now have to retake the tutorial. Please pay more attention this time!");
  481. }
  482. default:
  483. {
  484. PlayerInfo[playerid][pTut]++;
  485. AdvanceTutorial(playerid);
  486. }
  487. }
  488. }
  489. case 10:
  490. {
  491. if(!response) return AdvanceTutorial(playerid);
  492. switch(listitem)
  493. {
  494. case 0, 2:
  495. {
  496. PlayerInfo[playerid][pTut] = 0;
  497. AdvanceTutorial(playerid);
  498. SendClientMessage(playerid, -1, "That's the wrong answer! You now have to retake the tutorial. Please pay more attention this time!");
  499. }
  500. default:
  501. {
  502. PlayerInfo[playerid][pTut]++;
  503. AdvanceTutorial(playerid);
  504. }
  505. }
  506. }
  507. case 11, 12:
  508. {
  509. PlayerInfo[playerid][pTut]++;
  510. AdvanceTutorial(playerid);
  511. }
  512. case 13: CharacterCreation(playerid);
  513. case 14:
  514. {
  515. if(!response)
  516. {
  517. PlayerInfo[playerid][pTut] = -1;
  518. DisablePlayerCheckpoint(playerid);
  519. return SendClientMessageEx(playerid, -1, "Welcome to Mountain Roleplay! Remember to use /help if you need a refresher on commands or /newb(ie) to ask for help!");
  520. }
  521. else
  522. {
  523. PlayerInfo[playerid][pTut]++;
  524. AdvanceTutorial(playerid);
  525. SendClientMessageEx(playerid, COLOR_WHITE, "You have chosen the objectives. Please type \"/cancel objectives\" at any time to cancel.");
  526. }
  527. }
  528. }
  529. }
  530. case DIALOG_REGISTER_CREATION:
  531. {
  532. if(!response) return CharacterCreation(playerid);
  533. switch(listitem)
  534. {
  535. case 0: return CharacterCreation(playerid);
  536. case 1: return ShowPlayerDialogEx(playerid, DIALOG_REGISTER_SEX, DIALOG_STYLE_LIST, "LACO-RP Character Creation | Select Gender", "Male\nFemale", "Select", "<<");
  537. case 2: return ShowPlayerDialogEx(playerid, DIALOG_REGISTER_MONTH, DIALOG_STYLE_LIST, "{FF0000}Which month was your character born?", "January\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\nDecember", "Select", "<<");
  538. case 3: return ShowPlayerDialogEx(playerid, DIALOG_REGISTER_NATION, DIALOG_STYLE_LIST, "LACO-RP Character Creation | Nation", "San Andreas", "Select", "<<");
  539. case 4:
  540. {
  541. szMiscArray[0] = 0;
  542. szMiscArray = "No accent\n\
  543. British accent\n\
  544. Japanese accent\n\
  545. Chinese accent\n\
  546. Korean accent\n\
  547. Scottish accent\n\
  548. Irish accent\n\
  549. Russian accent\n\
  550. American accent\n\
  551. Spanish accent\n\
  552. Southern accent\n\
  553. Italian accent\n\
  554. Southern accent\n\
  555. Gangster accent\n\
  556. Australian accent\n\
  557. Arabic accent\n\
  558. Balkan accent\n\
  559. Canadian accent\n\
  560. Jamaican accent\n\
  561. Israeli accent\n\
  562. Dutch accent\n\
  563. Brazilian accent\n\
  564. German accent\n\
  565. Turkish accent\n\
  566. Kiwi accent\n\
  567. French accent\n\
  568. Korean accent\n\
  569. Thai accent";
  570. return ShowPlayerDialogEx(playerid, DIALOG_REGISTER_ACCENT, DIALOG_STYLE_LIST, "LACO-RP Character Creation | Accent", szMiscArray, "Select", "<<");
  571. }
  572. case 5:
  573. {
  574. if(PlayerInfo[playerid][pSex] == 0) {
  575. SendClientMessage(playerid, COLOR_YELLOW, "Please select your gender first.");
  576. return ShowPlayerDialogEx(playerid, DIALOG_REGISTER_SEX, DIALOG_STYLE_LIST, "LACO-RP Character Creation | Skin Model", "Male\nFemale", "Select", "<<");
  577. }
  578. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_SKIN, DIALOG_STYLE_INPUT, "LACO-RP Character Creation | Skin Model", "Please enter a skin ID for your character.", "Select", "<<");
  579. }
  580. case 6:
  581. {
  582. if(PlayerInfo[playerid][pSex] == 0)
  583. {
  584. SendClientMessage(playerid, COLOR_YELLOW, "Please pick a gender.");
  585. return ShowPlayerDialogEx(playerid, DIALOG_REGISTER_SEX, DIALOG_STYLE_LIST, "LACO-RP Character Creation | Skin Model", "Male\nFemale", "Select", "<<");
  586. }
  587. if(strcmp(PlayerInfo[playerid][pBirthDate], "0000-00-00") == 0)
  588. {
  589. SendClientMessage(playerid, COLOR_YELLOW, "Please specify your birthdate.");
  590. return ShowPlayerDialogEx(playerid, DIALOG_REGISTER_MONTH, DIALOG_STYLE_LIST, "{FF0000}Which month was your character born?", "January\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\nDecember", "Select", "<<");
  591. }
  592. if(PlayerInfo[playerid][pNation] != 0 && PlayerInfo[playerid][pNation] != 1) return ShowPlayerDialogEx(playerid, DIALOG_REGISTER_NATION, DIALOG_STYLE_LIST, "LACO-RP Character Creation | Nation", "San Andreas\nNew Robada", "Select", "<<");
  593. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_REFERRED, DIALOG_STYLE_INPUT, "{FF0000}Referral System", "Have you been referred to our server by one of our players?\nIf so, please enter the player name below.\n\nIf you haven't been referred by anyone, you may press the skip button.\n\n{FF0000}Note: You must enter the player name with a underscore (Example: FirstName_LastName)", "Enter", "Skip");
  594. return 1;
  595. }
  596. }
  597. }
  598. case DIALOG_REGISTER_SKIN: {
  599. if(response && !isnull(inputtext) && IsNumeric(inputtext) && IsValidSkin(strval(inputtext))) {
  600. PlayerInfo[playerid][pModel] = strval(inputtext);
  601. AdjustActor(playerid, strval(inputtext));
  602. }
  603. CharacterCreation(playerid);
  604. }
  605. case DIALOG_REGISTER_SEX:
  606. {
  607. if(response)
  608. {
  609. if(listitem == 0) {
  610. PlayerInfo[playerid][pSex] = 1;
  611. PlayerInfo[playerid][pModel] = 2;
  612. AdjustActor(playerid, 2);
  613. SendClientMessage(playerid, COLOR_YELLOW2, "Alright, so you're a male!");
  614. CharacterCreation(playerid);
  615. }
  616. else if(listitem == 1) {
  617. PlayerInfo[playerid][pSex] = 2;
  618. PlayerInfo[playerid][pModel] = 91;
  619. AdjustActor(playerid, 91);
  620. SendClientMessage(playerid, COLOR_YELLOW2, "Alright, so you're a female!");
  621. CharacterCreation(playerid);
  622. }
  623. }
  624. else ShowPlayerDialogEx(playerid, DIALOG_REGISTER_SEX, DIALOG_STYLE_LIST, "{FF0000}Is your character male or female?", "Male\nFemale", "Submit", "");
  625. }
  626. case DIALOG_REGISTER_NATION:
  627. {
  628. if(response)
  629. {
  630. PlayerInfo[playerid][pNation] = listitem;
  631. switch(listitem)
  632. {
  633. case 0: SendClientMessageEx(playerid, COLOR_GRAD1, "You are now a citizen of San Andreas.");
  634. }
  635. }
  636. CharacterCreation(playerid);
  637. }
  638. case DIALOG_REGISTER_MONTH:
  639. {
  640. if(response)
  641. {
  642. szMiscArray[0] = 0;
  643. new month = listitem+1;
  644. SetPVarInt(playerid, "RegisterMonth", month);
  645. new lastdate;
  646. if(listitem == 0 || listitem == 2 || listitem == 4 || listitem == 6 || listitem == 7 || listitem == 9 || listitem == 11) lastdate = 32;
  647. else if(listitem == 3 || listitem == 5 || listitem == 8 || listitem == 10) lastdate = 31;
  648. else lastdate = 29;
  649. for(new x = 1; x < lastdate; x++)
  650. {
  651. format(szMiscArray, sizeof(szMiscArray), "%s%d\n", szMiscArray, x);
  652. }
  653. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_DAY, DIALOG_STYLE_LIST, "{FF0000}Which day was your character born?", szMiscArray, "Submit", "");
  654. }
  655. else return CharacterCreation(playerid);
  656. }
  657. case DIALOG_REGISTER_DAY:
  658. {
  659. szMiscArray[0] = 0;
  660. if(response)
  661. {
  662. new setday = listitem+1;
  663. SetPVarInt(playerid, "RegisterDay", setday);
  664. new month, day, year;
  665. getdate(year,month,day);
  666. new startyear = year-100;
  667. for(new x = startyear; x < year; x++)
  668. {
  669. format(szMiscArray, sizeof(szMiscArray), "%s%d\n", szMiscArray, x);
  670. }
  671. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_YEAR, DIALOG_STYLE_LIST, "{FF0000}Which year was your character born?", szMiscArray, "Submit", "");
  672. }
  673. else ShowPlayerDialogEx(playerid, DIALOG_REGISTER_MONTH, DIALOG_STYLE_LIST, "{FF0000}Which month was your character born?", "January\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\nDecember", "Submit", "");
  674. }
  675. case DIALOG_REGISTER_YEAR:
  676. {
  677. szMiscArray[0] = 0;
  678. new month, day, year;
  679. getdate(year,month,day);
  680. new startyear = year-100;
  681. if(response)
  682. {
  683. new setyear = listitem+startyear;
  684. format(PlayerInfo[playerid][pBirthDate], 11, "%d-%02d-%02d", setyear, GetPVarInt(playerid, "RegisterMonth"), GetPVarInt(playerid, "RegisterDay"));
  685. DeletePVar(playerid, "RegisterMonth");
  686. DeletePVar(playerid, "RegisterDay");
  687. SendClientMessage(playerid, COLOR_LIGHTRED, "Your birthdate has been successfully set.");
  688. return CharacterCreation(playerid);
  689. }
  690. else
  691. {
  692. for(new x = startyear; x < year; x++)
  693. {
  694. format(szMiscArray, sizeof(szMiscArray), "%s%d\n", szMiscArray, x);
  695. }
  696. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_YEAR, DIALOG_STYLE_LIST, "{FF0000}Which year was your character born?", szMiscArray, "Submit", "");
  697. }
  698. }
  699. case DIALOG_REGISTER_ACCENT:
  700. {
  701. if(response)
  702. {
  703. if(listitem == 0) PlayerInfo[playerid][pAccent] = listitem;
  704. if(listitem > 0) PlayerInfo[playerid][pAccent] = listitem+1;
  705. }
  706. return CharacterCreation(playerid);
  707. }
  708. case DIALOG_REGISTER_REFERRED:
  709. {
  710. if(response)
  711. {
  712. if(IsNumeric(inputtext))
  713. {
  714. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_REFERRED, DIALOG_STYLE_INPUT, "{FF0000}Error - Invalid Roleplay Name", "That is not a roleplay name\nPlease enter a proper roleplay name.\n\nExample: FirstName_LastName", "Enter", "Skip");
  715. return 1;
  716. }
  717. if(strfind(inputtext, "_", true) == -1)
  718. {
  719. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_REFERRED, DIALOG_STYLE_INPUT, "{FF0000}Error - Invalid Roleplay Name", "That is not a roleplay name\nPlease enter a proper roleplay name.\n\nExample: FirstName_LastName", "Enter", "Skip");
  720. return 1;
  721. }
  722. if(strlen(inputtext) > 20)
  723. {
  724. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_REFERRED, DIALOG_STYLE_INPUT, "{FF0000}Error - Invalid Roleplay Name", "That name is too long\nPlease shorten the name.\n\nExample: FirstName_LastName (20 Characters Max)", "Enter", "Skip");
  725. return 1;
  726. }
  727. if(strcmp(inputtext, GetPlayerNameExt(playerid), true) == 0)
  728. {
  729. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_REFERRED, DIALOG_STYLE_INPUT, "{FF0000}Error", "You can't add yourself as a referrer.\nPlease enter the referrer name or press 'Skip'.\n\nExample: FirstName_LastName (20 Characters Max)", "Enter", "Skip");
  730. return 1;
  731. }
  732. for(new sz = 0; sz < strlen(inputtext); sz++)
  733. {
  734. if(inputtext[sz] == ' ')
  735. {
  736. ShowPlayerDialogEx(playerid, DIALOG_REGISTER_REFERRED, DIALOG_STYLE_INPUT, "{FF0000}Error - Invalid Roleplay Name", "That is not a roleplay name\nPlease enter a proper roleplay name.\n\nExample: FirstName_LastName", "Enter", "Skip");
  737. return 1;
  738. }
  739. }
  740. mysql_escape_string(inputtext, szMiscArray);
  741. format(PlayerInfo[playerid][pReferredBy], MAX_PLAYER_NAME, "%s", szMiscArray);
  742. mysql_format(MainPipeline, szMiscArray, sizeof(szMiscArray), "SELECT `Username` FROM `accounts` WHERE `Username` = '%e'", inputtext);
  743. mysql_tquery(MainPipeline, szMiscArray, "OnQueryFinish", "iii", MAIN_REFERRAL_THREAD, playerid, g_arrQueryHandle{playerid});
  744. }
  745. else
  746. {
  747. format(szMiscArray, sizeof(szMiscArray), "Nobody");
  748. strmid(PlayerInfo[playerid][pReferredBy], szMiscArray, 0, strlen(szMiscArray), MAX_PLAYER_NAME);
  749. PlayerInfo[playerid][pTut] = 14;
  750. AdvanceTutorial(playerid);
  751. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Thanks for filling in all the information!");
  752. }
  753. }
  754. }
  755. return 0;
  756. }
  757. hook OnPlayerEnterCheckpoint(playerid)
  758. {
  759. if(PlayerInfo[playerid][pTut] >= 0)
  760. {
  761. switch(PlayerInfo[playerid][pTut])
  762. {
  763. case 15:
  764. {
  765. DisablePlayerCheckpoint(playerid);
  766. SendClientMessage(playerid, COLOR_WHITE, "Enter any vehicle you can afford to purchase it!");
  767. }
  768. case 16:
  769. {
  770. DisablePlayerCheckpoint(playerid);
  771. SendClientMessage(playerid, COLOR_WHITE, "Enter the building, press right mouse button to aim over the bank teller and press Y to interact with them!");
  772. }
  773. case 17:
  774. {
  775. DisablePlayerCheckpoint(playerid);
  776. SendClientMessage(playerid, COLOR_WHITE, "Enter the building and type /buy to purchase a phone.");
  777. }
  778. }
  779. }
  780. }
  781. forward AdjustActor(playerid, skinid);
  782. public AdjustActor(playerid, skinid)
  783. {
  784. new id;
  785. if(PlayerInfo[playerid][pTut] == 13 && GetPVarType(playerid, "pActor"))
  786. {
  787. id = GetPVarInt(playerid, "pActor");
  788. if(IsValidActor(id)) DestroyActor(id);
  789. }
  790. id = CreateActor(skinid, 221.1730, 1823.6620, 7.5124, 270.0);
  791. SetPVarInt(playerid, "pActor", id);
  792. SetActorVirtualWorld(id, playerid + 1);
  793. SetPlayerSkin(playerid, skinid);
  794. return 1;
  795. }
  796. forward TutorialTimer(playerid);
  797. public TutorialTimer(playerid)
  798. {
  799. if(GetPVarInt(playerid, "pTutorialTimer") > 0)
  800. {
  801. SetPVarInt(playerid, "pTutorialTimer", GetPVarInt(playerid, "pTutorialTimer") - 1);
  802. ShowTutorialDialog(playerid, PlayerInfo[playerid][pTut]);
  803. }
  804. else KillTimer(TutorialTime[playerid]);
  805. return 1;
  806. }
  807. GetPlayerAccent(iPlayerID)
  808. {
  809. new accent[26];
  810. switch(PlayerInfo[iPlayerID][pAccent])
  811. {
  812. case 0, 1: accent = "";
  813. case 2: accent = "British accent";
  814. case 3: accent = "Japanese accent";
  815. case 4: accent = "Chinese accent";
  816. case 5: accent = "Korean accent";
  817. case 6: accent = "Scottish accent";
  818. case 7: accent = "Irish accent";
  819. case 8: accent = "Russian accent";
  820. case 9: accent = "American accent";
  821. case 10, 12: accent = "Spanish accent";
  822. case 11: accent = "Southern accent";
  823. case 13: accent = "Italian accent";
  824. case 14: accent = "Gangster accent";
  825. case 15: accent = "Australian accent";
  826. case 16: accent = "Arabic accent";
  827. case 17: accent = "Balkan accent";
  828. case 18: accent = "Canadian accent";
  829. case 19: accent = "Jamaican accent";
  830. case 20: accent = "Israeli accent";
  831. case 21: accent = "Dutch accent";
  832. case 22: accent = "Brazilian accent";
  833. case 23: accent = "German accent";
  834. case 24: accent = "Turkish accent";
  835. case 25: accent = "Kiwi accent";
  836. case 26: accent = "French accent";
  837. case 27: accent = "Korean accent";
  838. case 28: accent = "Thai accent";
  839. }
  840. return accent;
  841. }
  842. hook OnPlayerDisconnect(playerid, reason)
  843. {
  844. if(GetPVarType(playerid, "pActor")) DestroyActor(GetPVarInt(playerid, "pActor"));
  845. return 1;
  846. }
  847. CMD:forcetutorial(playerid, params[])
  848. {
  849. if(PlayerInfo[playerid][pAdmin] >= 3)
  850. {
  851. new id;
  852. if(sscanf(params, "u", id)) return SendClientMessageEx(playerid, COLOR_WHITE, "SYNTAX: /forcetutorial [playerid]");
  853. if(IsPlayerConnected(id))
  854. {
  855. szMiscArray[0] = 0;
  856. switch(PlayerInfo[id][pTut])
  857. {
  858. case 0 .. 12:
  859. {
  860. PlayerInfo[id][pTut] = 13;
  861. AdvanceTutorial(id);
  862. format(szMiscArray, 128, "You have sent %s to the Character Creation Menu.", GetPlayerNameEx(id));
  863. SendClientMessage(playerid, COLOR_WHITE, szMiscArray);
  864. format(szMiscArray, 128, "Administrator %s has sent you to the Character Creation Menu.", GetPlayerNameEx(playerid));
  865. SendClientMessage(id, COLOR_WHITE, szMiscArray);
  866. }
  867. case 13: return SendClientMessage(playerid, COLOR_WHITE, "This player is currently in the character creation menu, please wait.");
  868. case 14 .. 18:
  869. {
  870. PlayerInfo[id][pTut] = -1;
  871. AdvanceTutorial(id);
  872. format(szMiscArray, 128, "You have forced %s out of the tutorial.", GetPlayerNameEx(id));
  873. SendClientMessage(playerid, COLOR_WHITE, szMiscArray);
  874. format(szMiscArray, 128, "Administrator %s has forced you out of the tutorial.", GetPlayerNameEx(playerid));
  875. SendClientMessage(id, COLOR_WHITE, szMiscArray);
  876. }
  877. default: return SendClientMessage(playerid, COLOR_WHITE, "This player is not in the tutorial.");
  878. }
  879. }
  880. else return SendClientMessage(playerid, COLOR_WHITE, "This player is not connected!");
  881. }
  882. else SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to perform this command!");
  883. return 1;
  884. }