Advertisement
Guest User

Untitled

a guest
Oct 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. #include <a_samp>
  2. #include <DOF2>
  3.  
  4. #define DIALOG_REGISTRO 1
  5. #define DIALOG_LOGIN 2
  6.  
  7. main()
  8. {
  9. print("\n----------------------------------");
  10. print(" Blank Gamemode by your name here");
  11. print("----------------------------------\n");
  12. }
  13.  
  14. public OnGameModeInit()
  15. {
  16. // Don't use these lines if it's a filterscript
  17. SetGameModeText("Blank Script");
  18. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  19. return 1;
  20. }
  21.  
  22. public OnGameModeExit()
  23. {
  24. DOF2_Exit();
  25. return 1;
  26. }
  27.  
  28. public OnPlayerRequestClass(playerid, classid)
  29. {
  30. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  31. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  32. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  33. new file[50], aname[MAX_PLAYER_NAME], string[250];
  34. GetPlayerName(playerid, aname, sizeof(aname));
  35. format(file, sizeof(file), "Contas/%s.ini", aname);
  36. if(DOF2_FileExists(file))
  37. (
  38. format(string, sizeof(string), "Olá %s Seja Bem Vindo(a) Novamente Em Nosso Servidor !\nDigite Sua Senha Para Se Logar.", aname);
  39. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logar", string, "Logar", "Cancelar");
  40. (
  41. else
  42. )
  43. format(string, sizeof(string), "Olá %s Seja Bem Vindo(a) Pela Primeira Vez Em Nosso Servidor !\nDigite Sua Senha Para Se Registrar.", aname);
  44. ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Registrar", string, "Registrar", "Cancelar");
  45. return 1;
  46. }
  47.  
  48. public OnPlayerConnect(playerid)
  49. {
  50. return 1;
  51. }
  52.  
  53. public OnPlayerDisconnect(playerid, reason)
  54. {
  55. return 1;
  56. }
  57.  
  58. public OnPlayerSpawn(playerid)
  59. {
  60. return 1;
  61. }
  62.  
  63. public OnPlayerDeath(playerid, killerid, reason)
  64. {
  65. return 1;
  66. }
  67.  
  68. public OnVehicleSpawn(vehicleid)
  69. {
  70. return 1;
  71. }
  72.  
  73. public OnVehicleDeath(vehicleid, killerid)
  74. {
  75. return 1;
  76. }
  77.  
  78. public OnPlayerText(playerid, text[])
  79. {
  80. return 1;
  81. }
  82.  
  83. public OnPlayerCommandText(playerid, cmdtext[])
  84. {
  85. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  86. {
  87. // Do something here
  88. return 1;
  89. }
  90. return 0;
  91. }
  92.  
  93. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  94. {
  95. return 1;
  96. }
  97.  
  98. public OnPlayerExitVehicle(playerid, vehicleid)
  99. {
  100. return 1;
  101. }
  102.  
  103. public OnPlayerStateChange(playerid, newstate, oldstate)
  104. {
  105. return 1;
  106. }
  107.  
  108. public OnPlayerEnterCheckpoint(playerid)
  109. {
  110. return 1;
  111. }
  112.  
  113. public OnPlayerLeaveCheckpoint(playerid)
  114. {
  115. return 1;
  116. }
  117.  
  118. public OnPlayerEnterRaceCheckpoint(playerid)
  119. {
  120. return 1;
  121. }
  122.  
  123. public OnPlayerLeaveRaceCheckpoint(playerid)
  124. {
  125. return 1;
  126. }
  127.  
  128. public OnRconCommand(cmd[])
  129. {
  130. return 1;
  131. }
  132.  
  133. public OnPlayerRequestSpawn(playerid)
  134. {
  135. return 1;
  136. }
  137.  
  138. public OnObjectMoved(objectid)
  139. {
  140. return 1;
  141. }
  142.  
  143. public OnPlayerObjectMoved(playerid, objectid)
  144. {
  145. return 1;
  146. }
  147.  
  148. public OnPlayerPickUpPickup(playerid, pickupid)
  149. {
  150. return 1;
  151. }
  152.  
  153. public OnVehicleMod(playerid, vehicleid, componentid)
  154. {
  155. return 1;
  156. }
  157.  
  158. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  159. {
  160. return 1;
  161. }
  162.  
  163. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  164. {
  165. return 1;
  166. }
  167.  
  168. public OnPlayerSelectedMenuRow(playerid, row)
  169. {
  170. return 1;
  171. }
  172.  
  173. public OnPlayerExitedMenu(playerid)
  174. {
  175. return 1;
  176. }
  177.  
  178. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  179. {
  180. return 1;
  181. }
  182.  
  183. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  184. {
  185. return 1;
  186. }
  187.  
  188. public OnRconLoginAttempt(ip[], password[], success)
  189. {
  190. return 1;
  191. }
  192.  
  193. public OnPlayerUpdate(playerid)
  194. {
  195. return 1;
  196. }
  197.  
  198. public OnPlayerStreamIn(playerid, forplayerid)
  199. {
  200. return 1;
  201. }
  202.  
  203. public OnPlayerStreamOut(playerid, forplayerid)
  204. {
  205. return 1;
  206. }
  207.  
  208. public OnVehicleStreamIn(vehicleid, forplayerid)
  209. {
  210. return 1;
  211. }
  212.  
  213. public OnVehicleStreamOut(vehicleid, forplayerid)
  214. {
  215. return 1;
  216. }
  217.  
  218. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  219. {
  220. new file[50], aname[MAX_PLAYER_NAME];
  221. GetPlayerName(playerid, aname, sizeof(aname));
  222. format(file, sizeof(file), "Contas/%s.ini", aname);
  223. if(dialogid == DIALOG_REGISTRO)
  224. (
  225. DOF2_CreateFile(file);
  226. DOF2_SetString(file, "Senha", inputtext);
  227. DOF2_SetInt(file, "Dinheiro", 10000);
  228. DOF2_SaveFile();
  229. SendClientMessage(playerid, 0xFFFF00AA, "Registrado Com Sucesso!");
  230. SpawnPlayer(playerid);
  231. )
  232.  
  233. if(dialogid == DIALOG_LOGIN)
  234. (
  235. if(strcmp(inputtext, DOF2_GetString(file, "Senha"), true) == 0);
  236. (
  237. )
  238. )
  239. return 1;
  240. }
  241.  
  242. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  243. {
  244. return 1;
  245. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement