artyom_triodin1

ChangePass For Samp By Artyom Triodin

Oct 19th, 2013
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.67 KB | None | 0 0
  1. //ChangePassWord By : Artyom Triodin
  2. //Important Download Dini.inc if you dont have and Create a Folder In scriptfiles the folder's Name Need To Be - Logins
  3. // Have Any Problems Send Me A Message !!! :) !!! yes it is have 6 warrning but dont worry its nothing thats only the lose indetation warrning only cuz of pastebin txt :) !!!
  4. //Have Errors Ask Me just Message !!!
  5. //Add Me On Facebook : https://www.facebook.com/#!/aartyom.ttriodin
  6. //All Credit To Artyom Triodin Thx For Downloading :) !!! ... Enjoey ... . .. . . . .. . .
  7.  
  8. #include <a_samp>
  9.  
  10. #include <dini>
  11.  
  12. #define NEWPASS 1
  13.  
  14. #define OLDPASS 2
  15.  
  16.  
  17. #if defined FILTERSCRIPT
  18.  
  19. public OnFilterScriptInit()
  20. {
  21. print("\n--------------------------------------");
  22. print(" Blank Filterscript by your name here");
  23. print("--------------------------------------\n");
  24. return 1;
  25. }
  26.  
  27. public OnFilterScriptExit()
  28. {
  29. return 1;
  30. }
  31.  
  32. #else
  33.  
  34. main()
  35. {
  36. print("\n----------------------------------");
  37. print(" Blank Gamemode by your name here");
  38. print("----------------------------------\n");
  39. }
  40.  
  41. #endif
  42.  
  43. public OnGameModeInit()
  44. {
  45. // Don't use these lines if it's a filterscript
  46. SetGameModeText("Blank Script");
  47. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  48. return 1;
  49. }
  50.  
  51. public OnGameModeExit()
  52. {
  53. return 1;
  54. }
  55.  
  56. public OnPlayerRequestClass(playerid, classid)
  57. {
  58. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  59. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  60. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  61. return 1;
  62. }
  63.  
  64. public OnPlayerConnect(playerid)
  65. {
  66. SendClientMessage(playerid, 0xFFFF00C8, "/ChangePass if You Dont Like Your Old Pass");
  67. return 1;
  68. }
  69.  
  70. public OnPlayerDisconnect(playerid, reason)
  71. {
  72. return 1;
  73. }
  74.  
  75. public OnPlayerSpawn(playerid)
  76. {
  77. return 1;
  78. }
  79.  
  80. public OnPlayerDeath(playerid, killerid, reason)
  81. {
  82. return 1;
  83. }
  84.  
  85. public OnVehicleSpawn(vehicleid)
  86. {
  87. return 1;
  88. }
  89.  
  90. public OnVehicleDeath(vehicleid, killerid)
  91. {
  92. return 1;
  93. }
  94.  
  95. public OnPlayerText(playerid, text[])
  96. {
  97. return 1;
  98. }
  99.  
  100. public OnPlayerCommandText(playerid, cmdtext[])
  101. {
  102. if (strcmp("/ChangePass", cmdtext, true, 10) == 0)
  103. {
  104. new Logins[28];
  105. GetPlayerMoney(playerid);
  106. GetPlayerMoney(dini_Int(Logins, "Cash"));
  107. if(GetPlayerMoney(playerid)) return GivePlayerMoney(playerid, dini_Int(Logins, "Cash"));
  108. new pName [MAX_PLAYER_NAME];
  109. GetPlayerName(playerid, pName, sizeof(pName));
  110. format(Logins, sizeof(Logins), "/Logins/%s.txt", pName);
  111. if(dini_Exists(Logins))
  112. {
  113. SendClientMessage(playerid, 0x00FF00C8, "Type Your Old Password !!! ");
  114. ShowPlayerDialog(playerid, OLDPASS, DIALOG_STYLE_PASSWORD, "Old Password Recuided !!! ...", "Type Your Old Password : ", "Done", "Cancel");
  115. ShowPlayerDialog(playerid, NEWPASS, DIALOG_STYLE_INPUT, "ChangePassword", "Change Yor Password!!!", "Change", "Cancel");
  116. }
  117. return 1;
  118. }
  119. return 0;
  120. }
  121.  
  122. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  123. {
  124. return 1;
  125. }
  126.  
  127. public OnPlayerExitVehicle(playerid, vehicleid)
  128. {
  129. return 1;
  130. }
  131.  
  132. public OnPlayerStateChange(playerid, newstate, oldstate)
  133. {
  134. return 1;
  135. }
  136.  
  137. public OnPlayerEnterCheckpoint(playerid)
  138. {
  139. return 1;
  140. }
  141.  
  142. public OnPlayerLeaveCheckpoint(playerid)
  143. {
  144. return 1;
  145. }
  146.  
  147. public OnPlayerEnterRaceCheckpoint(playerid)
  148. {
  149. return 1;
  150. }
  151.  
  152. public OnPlayerLeaveRaceCheckpoint(playerid)
  153. {
  154. return 1;
  155. }
  156.  
  157. public OnRconCommand(cmd[])
  158. {
  159. return 1;
  160. }
  161.  
  162. public OnPlayerRequestSpawn(playerid)
  163. {
  164. return 1;
  165. }
  166.  
  167. public OnObjectMoved(objectid)
  168. {
  169. return 1;
  170. }
  171.  
  172. public OnPlayerObjectMoved(playerid, objectid)
  173. {
  174. return 1;
  175. }
  176.  
  177. public OnPlayerPickUpPickup(playerid, pickupid)
  178. {
  179. return 1;
  180. }
  181.  
  182. public OnVehicleMod(playerid, vehicleid, componentid)
  183. {
  184. return 1;
  185. }
  186.  
  187. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  188. {
  189. return 1;
  190. }
  191.  
  192. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  193. {
  194. return 1;
  195. }
  196.  
  197. public OnPlayerSelectedMenuRow(playerid, row)
  198. {
  199. return 1;
  200. }
  201.  
  202. public OnPlayerExitedMenu(playerid)
  203. {
  204. return 1;
  205. }
  206.  
  207. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  208. {
  209. return 1;
  210. }
  211.  
  212. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  213. {
  214. return 1;
  215. }
  216.  
  217. public OnRconLoginAttempt(ip[], password[], success)
  218. {
  219. return 1;
  220. }
  221.  
  222. public OnPlayerUpdate(playerid)
  223. {
  224. return 1;
  225. }
  226.  
  227. public OnPlayerStreamIn(playerid, forplayerid)
  228. {
  229. return 1;
  230. }
  231.  
  232. public OnPlayerStreamOut(playerid, forplayerid)
  233. {
  234. return 1;
  235. }
  236.  
  237. public OnVehicleStreamIn(vehicleid, forplayerid)
  238. {
  239. return 1;
  240. }
  241.  
  242. public OnVehicleStreamOut(vehicleid, forplayerid)
  243. {
  244. return 1;
  245. }
  246.  
  247. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  248. {
  249. if(dialogid == NEWPASS)
  250. {
  251. if(response == 0)
  252. {
  253. new pName;
  254. GetPlayerName(playerid, "%s", pName);
  255. }
  256. if(response == 1)
  257. {
  258. if(!strlen(inputtext))
  259. {
  260. SendClientMessage(playerid, 0x00FF00C8, "Change Yor Password!!!");
  261. ShowPlayerDialog(playerid, NEWPASS, DIALOG_STYLE_INPUT, "Password Change......", "Please Create Your Password!!!", "Register", "Quit");
  262. }
  263. Register(playerid, (inputtext));
  264. }
  265. }
  266. return 1;
  267. }
  268.  
  269. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  270. {
  271. return 1;
  272. }
  273.  
  274. stock Register(playerid, key[])
  275. {
  276. new Logins[28];
  277. new pName [MAX_PLAYER_NAME];
  278. GetPlayerName(playerid, pName, sizeof(pName));
  279. format(Logins, sizeof(Logins), "/Logins/%s.txt", pName);
  280. dini_Create(Logins);
  281. dini_Set(Logins, "Passwort", key);
  282. dini_IntSet(Logins, "Freaktion", 0);
  283. SendClientMessage(playerid, 0x00FF00C8, "Passwrd Changed :) !!! :) :)");
  284. return 1;
  285. }
  286.  
  287. stock Login(playerid, key[])
  288. {
  289. new Logins[28];
  290. new pName [MAX_PLAYER_NAME];
  291. GetPlayerName(playerid, pName, sizeof(pName));
  292. format(Logins, sizeof(Logins), "/Logins/%s.txt", pName);
  293. if(!strcmp(key, dini_Get(Logins, "passwort"), false))
  294. {
  295. SendClientMessage(playerid, 0x00FF00C8, "You SuccesFully Logged-In !!!!!!!!!!!!");
  296. return 1;
  297. }
  298. else
  299. {
  300. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT,""COL_RED"TRY AGAIN",""COL_RED"You Have Entered An Incorrect Password.\n"COL_GREEN"Type Your Real Password If You Forgut Your Password Create A New Account Or Ask Th Administrator!!!\n"COL_BLUE"Type Your Password!!!:::\n"COL_YELLOW"Server Mod By Artyom Triodin\n"COL_BLUEE"System By Artyom Triodin","Login","Quit");
  301. return 1;
  302. }
  303. }
  304.  
  305. //ChangePassWord By : Artyom Triodin
  306. //Important Download Dini.inc if you dont have and Create a Folder In scriptfiles the folder's Name Need To Be - Logins
  307. //Have Errors Ask Me just Message !!!
  308. //Add Me On Facebook : https://www.facebook.com/#!/aartyom.ttriodin
  309. //All Credit To Artyom Triodin Thx For Downloading :) !!! ... Enjoey ... . .. . . . .. . .
Advertisement
Add Comment
Please, Sign In to add comment