Advertisement
Guest User

Untitled

a guest
Jul 21st, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 12.24 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. //#include <dini>
  7. #include <zcmd>
  8.  
  9. new rpmark1[MAX_PLAYERS];
  10. new rpmark2[MAX_PLAYERS];
  11. new rpmark3[MAX_PLAYERS];
  12. new rpmark4[MAX_PLAYERS];
  13. new rpmark5[MAX_PLAYERS];
  14. new rpmark6[MAX_PLAYERS];
  15. new rpmark7[MAX_PLAYERS];
  16. new rpmark8[MAX_PLAYERS];
  17. new rpmark9[MAX_PLAYERS];
  18. new rpmark10[MAX_PLAYERS];
  19.  
  20. #if defined FILTERSCRIPT
  21.  
  22. public OnFilterScriptInit()
  23. {
  24.     print("\n--------------------------------------");
  25.     print(" Blank Filterscript by your name here");
  26.     print("--------------------------------------\n");
  27.     return 1;
  28. }
  29.  
  30. public OnFilterScriptExit()
  31. {
  32.     return 1;
  33. }
  34.  
  35. #else
  36.  
  37. main()
  38. {
  39.     print("\n----------------------------------");
  40.     print(" Blank Gamemode by your name here");
  41.     print("----------------------------------\n");
  42. }
  43.  
  44. #endif
  45.  
  46. public OnGameModeInit()
  47. {
  48.     // Don't use these lines if it's a filterscript
  49.     SetGameModeText("Blank Script");
  50.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  51.     return 1;
  52. }
  53.  
  54. public OnGameModeExit()
  55. {
  56.     return 1;
  57. }
  58.  
  59. public OnPlayerRequestClass(playerid, classid)
  60. {
  61.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  62.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  63.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  64.     return 1;
  65. }
  66.  
  67. public OnPlayerConnect(playerid)
  68. {
  69.     if(dini_Exists(PlayerPath1(playerid))) return LoadPlayerRpmarks4(playerid);
  70.     if(dini_Exists(PlayerPath2(playerid))) return LoadPlayerRpmarks4(playerid);
  71.     if(dini_Exists(PlayerPath3(playerid))) return LoadPlayerRpmarks4(playerid);
  72.     if(dini_Exists(PlayerPath4(playerid))) return LoadPlayerRpmarks4(playerid);
  73.     if(dini_Exists(PlayerPath5(playerid))) return LoadPlayerRpmarks4(playerid);
  74.     if(dini_Exists(PlayerPath6(playerid))) return LoadPlayerRpmarks5(playerid);
  75.     if(dini_Exists(PlayerPath7(playerid))) return LoadPlayerRpmarks6(playerid);
  76.     if(dini_Exists(PlayerPath8(playerid))) return LoadPlayerRpmarks7(playerid);
  77.     if(dini_Exists(PlayerPath9(playerid))) return LoadPlayerRpmarks9(playerid);
  78.     if(dini_Exists(PlayerPath10(playerid))) return LoadPlayerRpmarks10(playerid);
  79.     return 1;
  80. }
  81.  
  82. public OnPlayerDisconnect(playerid, reason)
  83. {
  84.     return 1;
  85. }
  86.  
  87. public OnPlayerSpawn(playerid)
  88. {
  89.     return 1;
  90. }
  91.  
  92. public OnPlayerDeath(playerid, killerid, reason)
  93. {
  94.     return 1;
  95. }
  96.  
  97. public OnVehicleSpawn(vehicleid)
  98. {
  99.     return 1;
  100. }
  101.  
  102. public OnVehicleDeath(vehicleid, killerid)
  103. {
  104.     return 1;
  105. }
  106.  
  107. public OnPlayerText(playerid, text[])
  108. {
  109.     return 1;
  110. }
  111.  
  112. public OnPlayerCommandText(playerid, cmdtext[])
  113. {
  114.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  115.     {
  116.         // Do something here
  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.     return 1;
  250. }
  251.  
  252. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  253. {
  254.     return 1;
  255. }
  256. //
  257. stock PlayerPath1(playerid)
  258. {
  259.     new path[45];
  260.     format(path, sizeof(path),"Rpmarks1_%s.ini", PlayerName(playerid));
  261.     return path;
  262. }
  263. stock PlayerPath2(playerid)
  264. {
  265.     new path[45];
  266.     format(path, sizeof(path),"Rpmarks2_%s.ini", PlayerName(playerid));
  267.     return path;
  268. }
  269. stock PlayerPath3(playerid)
  270. {
  271.     new path[45];
  272.     format(path, sizeof(path),"Rpmarks3_%s.ini", PlayerName(playerid));
  273.     return path;
  274. }
  275. stock PlayerPath4(playerid)
  276. {
  277.     new path[45];
  278.     format(path, sizeof(path),"Rpmarks4_%s.ini", PlayerName(playerid));
  279.     return path;
  280. }
  281. stock PlayerPath5(playerid)
  282. {
  283.     new path[45];
  284.     format(path, sizeof(path),"Rpmarks5_%s.ini", PlayerName(playerid));
  285.     return path;
  286. }
  287. stock PlayerPath6(playerid)
  288. {
  289.     new path[45];
  290.     format(path, sizeof(path),"Rpmarks6_%s.ini", PlayerName(playerid));
  291.     return path;
  292. }
  293. stock PlayerPath7(playerid)
  294. {
  295.     new path[45];
  296.     format(path, sizeof(path),"Rpmarks7_%s.ini", PlayerName(playerid));
  297.     return path;
  298. }
  299. stock PlayerPath8(playerid)
  300. {
  301.     new path[45];
  302.     format(path, sizeof(path),"Rpmarks8_%s.ini", PlayerName(playerid));
  303.     return path;
  304. }
  305. stock PlayerPath9(playerid)
  306. {
  307.     new path[45];
  308.     format(path, sizeof(path),"Rpmarks9_%s.ini", PlayerName(playerid));
  309.     return path; // there was two semi-colons here. Removed one
  310. }
  311. stock PlayerPath10(playerid)
  312. {
  313. new path[45];
  314. format(path, sizeof(path),"Rpmarks10_%s.ini", PlayerName(playerid));
  315. return path;
  316. }
  317. // Stocks
  318. stock PlayerName(playerid)
  319. {
  320.     new name[MAX_PLAYER_NAME];
  321.     GetPlayerName(playerid, name, sizeof(name));
  322.     return name;
  323. }
  324. stock LoadPlayerRpmarks1(playerid)
  325. {
  326.     rpmark1[playerid] = 1; // it was ==. Should be = you're setting the variable.
  327.     return 1; // stock should return a value.
  328. }
  329. stock LoadPlayerRpmarks2(playerid)
  330. {
  331.     rpmark2[playerid] = 1;  // it was ==. Should be = you're setting the variable.
  332.     return 1; // stock should return a value.
  333. }
  334. stock LoadPlayerRpmarks3(playerid)
  335. {
  336.     rpmark3[playerid] = 1;  // it was ==. Should be = you're setting the variable.
  337.     return 1; // stock should return a value.
  338. }
  339. stock LoadPlayerRpmarks4(playerid)
  340. {
  341.     rpmark4[playerid] = 1;  // it was ==. Should be = you're setting the variable.
  342.     return 1; // stock should return a value.
  343. }
  344. stock LoadPlayerRpmarks5(playerid)
  345. {
  346.     rpmark5[playerid] = 1;  // it was ==. Should be = you're setting the variable.
  347.     return 1; // stock should return a value.
  348. }
  349. stock LoadPlayerRpmarks6(playerid)
  350. {
  351.     rpmark6[playerid] = 1;  // it was ==. Should be = you're setting the variable.
  352.     return 1; // stock should return a value.
  353. }
  354. stock LoadPlayerRpmarks7(playerid)
  355. {
  356.     rpmark7[playerid] = 1;  // it was ==. Should be = you're setting the variable.
  357.     return 1; // stock should return a value.
  358. }
  359. stock LoadPlayerRpmarks8(playerid)
  360. {
  361.     rpmark8[playerid] = 1;  // it was ==. Should be = you're setting the variable.
  362.     return 1; // stock should return a value.
  363. }
  364. stock LoadPlayerRpmarks9(playerid)
  365. {
  366.     rpmark9[playerid] = 1;  // it was ==. Should be = you're setting the variable.
  367.     return 1; // stock should return a value.
  368. }
  369. stock LoadPlayerRpmarks10(playerid)
  370. {
  371.     rpmark10[playerid] = 1;  // it was ==. Should be = you're setting the variable.
  372.     return 1; // stock should return a value.
  373. }
  374. //
  375. CMD:setrpmark1(playerid,params[])
  376. {
  377.     rpmark1[playerid] = 1; // it was ==. Should be = you're setting the variable.
  378.     dini_Create(PlayerPath1(playerid))
  379.     SendClientMessage(playerid,0xD6D6D6AA,"You got 1 rpmark by the following teacher");
  380.     return 1;
  381. }
  382. CMD:setrpmark2(playerid,params[])
  383. {
  384.     rpmark2[playerid] = 1; // it was ==. Should be = you're setting the variable.
  385.     dini_Create(PlayerPath2(playerid))
  386.     SendClientMessage(playerid,0xD6D6D6AA,"You got 2 rpmark by the following teacher");
  387.     return 1;
  388. }
  389. CMD:setrpmark3(playerid,params[])
  390. {
  391.     rpmark3[playerid] = 1; // it was ==. Should be = you're setting the variable.
  392.     dini_Create(PlayerPath3(playerid))
  393.     SendClientMessage(playerid,0xD6D6D6AA,"You got 3 rpmark by the following teacher");
  394.     return 1;
  395. }
  396. CMD:setrpmark4(playerid,params[])
  397. {
  398.     rpmark4[playerid] = 1; // it was ==. Should be = you're setting the variable.
  399.     dini_Create(PlayerPath4(playerid))
  400.     SendClientMessage(playerid,0xD6D6D6AA,"You got 4 rpmark by the following teacher");
  401.     return 1;
  402. }
  403. CMD:setrpmark5(playerid,params[])
  404. {
  405.     rpmark5[playerid] = 1; // it was ==. Should be = you're setting the variable.
  406.     SendClientMessage(playerid,0xD6D6D6AA,"You got 5 rpmark by the following teacher");
  407.     dini_Create(PlayerPath5(playerid))
  408.     return 1;
  409. }
  410. CMD:setrpmark6(playerid,params[])
  411. {
  412.     rpmark6[playerid] = 1; // it was ==. Should be = you're setting the variable.
  413.     dini_Create(PlayerPath6(playerid))
  414.     SendClientMessage(playerid,0xD6D6D6AA,"You got 6 rpmark by the following teacher");
  415.     return 1;
  416. }
  417. CMD:setrpmark7(playerid,params[])
  418. {
  419.     rpmark7[playerid] = 1; // it was ==. Should be = you're setting the variable.
  420.     dini_Create(PlayerPath7(playerid))
  421.     SendClientMessage(playerid,0xD6D6D6AA,"You got 7 rpmark by the following teacher");
  422.     return 1;
  423. }
  424. CMD:setrpmark8(playerid,params[])
  425. {
  426.     rpmark8[playerid] = 1; // it was ==. Should be = you're setting the variable.
  427.     dini_Create(PlayerPath8(playerid))
  428.     SendClientMessage(playerid,0xD6D6D6AA,"You got 8 rpmark by the following teacher");
  429.     return 1;
  430. }
  431. CMD:setrpmark9(playerid,params[])
  432. {
  433.     rpmark9[playerid] = 1; // it was ==. Should be = you're setting the variable.
  434.     dini_Create(PlayerPath9(playerid))
  435.     SendClientMessage(playerid,0xD6D6D6AA,"You got 9 rpmark by the following teacher");
  436.     return 1;
  437. }
  438. CMD:setrpmark10(playerid,params[])
  439. {
  440.     rpmark10[playerid] = 1; // it was ==. Should be = you're setting the variable.
  441.     dini_Create(PlayerPath10(playerid))
  442.     SendClientMessage(playerid,0xD6D6D6AA,"You got 10 rpmark by the following teacher");
  443.     return 1;
  444. }
  445. CMD:showrpmark1(playerid,params[])
  446. {
  447.     new otherid;
  448.     if(dini_Exists(PlayerPath1(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 1 rpmark");
  449.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  450.     if(dini_Exists(PlayerPath2(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 2 rpmark");
  451.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  452.     if(dini_Exists(PlayerPath3(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 3 rpmark");
  453.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  454.     if(dini_Exists(PlayerPath4(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 4 rpmark");
  455.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  456.     if(dini_Exists(PlayerPath5(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 5 rpmark");
  457.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  458.     if(dini_Exists(PlayerPath6(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 6 rpmark");
  459.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  460.     if(dini_Exists(PlayerPath7(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 7 rpmark");
  461.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  462.     if(dini_Exists(PlayerPath8(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 8 rpmark");
  463.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  464.     if(dini_Exists(PlayerPath9(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 9 rpmark");
  465.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  466.     if(dini_Exists(PlayerPath10(playerid))) return SendClientMessage(otherid,0xD6D6D6AA,"The player got 10 rpmark");
  467.     return SendClientMessage(otherid,0xD6D6D6AA,"You shown your rp mark to the player");
  468.     return 1;
  469. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement