Advertisement
Guest User

NateRP

a guest
Mar 3rd, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 19.57 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 <a_objects>
  7. #include <a_players>
  8. #include <a_vehicles>
  9. #include <zcmd>
  10. #include <YSI\y_ini>
  11. #include <file>
  12. #include <sscanf2>
  13.  
  14. #define COLOR_ACTIVEBORDER 0xB4B4B4FF
  15. #define COLOR_ACTIVECAPTION 0x99B4D1FF
  16. #define COLOR_ACTIVECAPTIONTEXT 0x000000FF
  17. #define COLOR_ALICEBLUE 0xF0F8FFFF
  18. #define COLOR_ANTIQUEWHITE 0xFAEBD7FF
  19. #define COLOR_APPWORKSPACE 0xABABABFF
  20. #define COLOR_AQUA 0x00FFFFFF
  21. #define COLOR_AQUAMARINE 0x7FFFD4FF
  22. #define COLOR_AZURE 0xF0FFFFFF
  23. #define COLOR_BEIGE 0xF5F5DCFF
  24. #define COLOR_BISQUE 0xFFE4C4FF
  25. #define COLOR_BLACK 0x000000FF
  26. #define COLOR_BLANCHEDALMOND 0xFFEBCDFF
  27. #define COLOR_BLUE 0x0000FFFF
  28. #define COLOR_BLUEVIOLET 0x8A2BE2FF
  29. #define COLOR_BROWN 0xA52A2AFF
  30. #define COLOR_BURLYWOOD 0xDEB887FF
  31. #define COLOR_BUTTONFACE 0xF0F0F0FF
  32. #define COLOR_BUTTONHIGHLIGHT 0xFFFFFFFF
  33. #define COLOR_BUTTONSHADOW 0xA0A0A0FF
  34. #define COLOR_CADETBLUE 0x5F9EA0FF
  35. #define COLOR_CHARTREUSE 0x7FFF00FF
  36. #define COLOR_CHOCOLATE 0xD2691EFF
  37. #define COLOR_CONTROL 0xF0F0F0FF
  38. #define COLOR_CONTROLDARK 0xA0A0A0FF
  39. #define COLOR_CONTROLDARKDARK 0x696969FF
  40. #define COLOR_CONTROLLIGHT 0xE3E3E3FF
  41. #define COLOR_CONTROLLIGHTLIGHT 0xFFFFFFFF
  42. #define COLOR_CONTROLTEXT 0x000000FF
  43. #define COLOR_CORAL 0xFF7F50FF
  44. #define COLOR_CORNFLOWERBLUE 0x6495EDFF
  45. #define COLOR_CORNSILK 0xFFF8DCFF
  46. #define COLOR_CRIMSON 0xDC143CFF
  47. #define COLOR_CYAN 0x00FFFFFF
  48. #define COLOR_DARKBLUE 0x00008BFF
  49. #define COLOR_DARKCYAN 0x008B8BFF
  50. #define COLOR_DARKGOLDENROD 0xB8860BFF
  51. #define COLOR_DARKGRAY 0xA9A9A9FF
  52. #define COLOR_DARKGREEN 0x006400FF
  53. #define COLOR_DARKKHAKI 0xBDB76BFF
  54. #define COLOR_DARKMAGENTA 0x8B008BFF
  55. #define COLOR_DARKOLIVEGREEN 0x556B2FFF
  56. #define COLOR_DARKORANGE 0xFF8C00FF
  57. #define COLOR_DARKORCHID 0x9932CCFF
  58. #define COLOR_DARKRED 0x8B0000FF
  59. #define COLOR_DARKSALMON 0xE9967AFF
  60. #define COLOR_DARKSEAGREEN 0x8FBC8BFF
  61. #define COLOR_DARKSLATEBLUE 0x483D8BFF
  62. #define COLOR_DARKSLATEGRAY 0x2F4F4FFF
  63. #define COLOR_DARKTURQUOISE 0x00CED1FF
  64. #define COLOR_DARKVIOLET 0x9400D3FF
  65. #define COLOR_DEEPPINK 0xFF1493FF
  66. #define COLOR_DEEPSKYBLUE 0x00BFFFFF
  67. #define COLOR_DESKTOP 0x000000FF
  68. #define COLOR_DIMGRAY 0x696969FF
  69. #define COLOR_DODGERBLUE 0x1E90FFFF
  70. #define COLOR_FIREBRICK 0xB22222FF
  71. #define COLOR_FLORALWHITE 0xFFFAF0FF
  72. #define COLOR_FORESTGREEN 0x228B22FF
  73. #define COLOR_FUCHSIA 0xFF00FFFF
  74. #define COLOR_GAINSBORO 0xDCDCDCFF
  75. #define COLOR_GHOSTWHITE 0xF8F8FFFF
  76. #define COLOR_GOLD 0xFFD700FF
  77. #define COLOR_GOLDENROD 0xDAA520FF
  78. #define COLOR_GRADIENTACTIVECAPTION 0xB9D1EAFF
  79. #define COLOR_GRADIENTINACTIVECAPTION 0xD7E4F2FF
  80. #define COLOR_GRAY 0x808080FF
  81. #define COLOR_GRAYTEXT 0x808080FF
  82. #define COLOR_GREEN 0x008000FF
  83. #define COLOR_GREENYELLOW 0xADFF2FFF
  84. #define COLOR_HIGHLIGHT 0x3399FFFF
  85. #define COLOR_HIGHLIGHTTEXT 0xFFFFFFFF
  86. #define COLOR_HONEYDEW 0xF0FFF0FF
  87. #define COLOR_HOTPINK 0xFF69B4FF
  88. #define COLOR_HOTTRACK 0x0066CCFF
  89. #define COLOR_INACTIVEBORDER 0xF4F7FCFF
  90. #define COLOR_INACTIVECAPTION 0xBFCDDBFF
  91. #define COLOR_INACTIVECAPTIONTEXT 0x434E54FF
  92. #define COLOR_INDIANRED 0xCD5C5CFF
  93. #define COLOR_INDIGO 0x4B0082FF
  94. #define COLOR_INFO 0xFFFFE1FF
  95. #define COLOR_INFOTEXT 0x000000FF
  96. #define COLOR_IVORY 0xFFFFF0FF
  97. #define COLOR_KHAKI 0xF0E68CFF
  98. #define COLOR_LAVENDER 0xE6E6FAFF
  99. #define COLOR_LAVENDERBLUSH 0xFFF0F5FF
  100. #define COLOR_LAWNGREEN 0x7CFC00FF
  101. #define COLOR_LEMONCHIFFON 0xFFFACDFF
  102. #define COLOR_LIGHTBLUE 0xADD8E6FF
  103. #define COLOR_LIGHTCORAL 0xF08080FF
  104. #define COLOR_LIGHTCYAN 0xE0FFFFFF
  105. #define COLOR_LIGHTGOLDENRODYELLOW 0xFAFAD2FF
  106. #define COLOR_LIGHTGRAY 0xD3D3D3FF
  107. #define COLOR_LIGHTGREEN 0x90EE90FF
  108. #define COLOR_LIGHTPINK 0xFFB6C1FF
  109. #define COLOR_LIGHTSALMON 0xFFA07AFF
  110. #define COLOR_LIGHTSEAGREEN 0x20B2AAFF
  111. #define COLOR_LIGHTSKYBLUE 0x87CEFAFF
  112. #define COLOR_LIGHTSLATEGRAY 0x778899FF
  113. #define COLOR_LIGHTSTEELBLUE 0xB0C4DEFF
  114. #define COLOR_LIGHTYELLOW 0xFFFFE0FF
  115. #define COLOR_LIME 0x00FF00FF
  116. #define COLOR_LIMEGREEN 0x32CD32FF
  117. #define COLOR_LINEN 0xFAF0E6FF
  118. #define COLOR_MAGENTA 0xFF00FFFF
  119. #define COLOR_MAROON 0x800000FF
  120. #define COLOR_MEDIUMAQUAMARINE 0x66CDAAFF
  121. #define COLOR_MEDIUMBLUE 0x0000CDFF
  122. #define COLOR_MEDIUMORCHID 0xBA55D3FF
  123. #define COLOR_MEDIUMPURPLE 0x9370DBFF
  124. #define COLOR_MEDIUMSEAGREEN 0x3CB371FF
  125. #define COLOR_MEDIUMSLATEBLUE 0x7B68EEFF
  126. #define COLOR_MEDIUMSPRINGGREEN 0x00FA9AFF
  127. #define COLOR_MEDIUMTURQUOISE 0x48D1CCFF
  128. #define COLOR_MEDIUMVIOLETRED 0xC71585FF
  129. #define COLOR_MENU 0xF0F0F0FF
  130. #define COLOR_MENUBAR 0xF0F0F0FF
  131. #define COLOR_MENUHIGHLIGHT 0x3399FFFF
  132. #define COLOR_MENUTEXT 0x000000FF
  133. #define COLOR_MIDNIGHTBLUE 0x191970FF
  134. #define COLOR_MINTCREAM 0xF5FFFAFF
  135. #define COLOR_MISTYROSE 0xFFE4E1FF
  136. #define COLOR_MOCCASIN 0xFFE4B5FF
  137. #define COLOR_NAVAJOWHITE 0xFFDEADFF
  138. #define COLOR_NAVY 0x000080FF
  139. #define COLOR_OLDLACE 0xFDF5E6FF
  140. #define COLOR_OLIVE 0x808000FF
  141. #define COLOR_OLIVEDRAB 0x6B8E23FF
  142. #define COLOR_ORANGE 0xFFA500FF
  143. #define COLOR_ORANGERED 0xFF4500FF
  144. #define COLOR_ORCHID 0xDA70D6FF
  145. #define COLOR_PALEGOLDENROD 0xEEE8AAFF
  146. #define COLOR_PALEGREEN 0x98FB98FF
  147. #define COLOR_PALETURQUOISE 0xAFEEEEFF
  148. #define COLOR_PALEVIOLETRED 0xDB7093FF
  149. #define COLOR_PAPAYAWHIP 0xFFEFD5FF
  150. #define COLOR_PEACHPUFF 0xFFDAB9FF
  151. #define COLOR_PERU 0xCD853FFF
  152. #define COLOR_PINK 0xFFC0CBFF
  153. #define COLOR_PLUM 0xDDA0DDFF
  154. #define COLOR_POWDERBLUE 0xB0E0E6FF
  155. #define COLOR_PURPLE 0x800080FF
  156. #define COLOR_RED 0xFF0000FF
  157. #define COLOR_ROSYBROWN 0xBC8F8FFF
  158. #define COLOR_ROYALBLUE 0x4169E1FF
  159. #define COLOR_SADDLEBROWN 0x8B4513FF
  160. #define COLOR_SALMON 0xFA8072FF
  161. #define COLOR_SANDYBROWN 0xF4A460FF
  162. #define COLOR_SCROLLBAR 0xC8C8C8FF
  163. #define COLOR_SEAGREEN 0x2E8B57FF
  164. #define COLOR_SEASHELL 0xFFF5EEFF
  165. #define COLOR_SIENNA 0xA0522DFF
  166. #define COLOR_SILVER 0xC0C0C0FF
  167. #define COLOR_SKYBLUE 0x87CEEBFF
  168. #define COLOR_SLATEBLUE 0x6A5ACDFF
  169. #define COLOR_SLATEGRAY 0x708090FF
  170. #define COLOR_SNOW 0xFFFAFAFF
  171. #define COLOR_SPRINGGREEN 0x00FF7FFF
  172. #define COLOR_STEELBLUE 0x4682B4FF
  173. #define COLOR_TAN 0xD2B48CFF
  174. #define COLOR_TEAL 0x008080FF
  175. #define COLOR_THISTLE 0xD8BFD8FF
  176. #define COLOR_TOMATO 0xFF6347FF
  177. #define COLOR_TRANSPARENT 0xFFFFFF00
  178. #define COLOR_TURQUOISE 0x40E0D0FF
  179. #define COLOR_VIOLET 0xEE82EEFF
  180. #define COLOR_WHEAT 0xF5DEB3FF
  181. #define COLOR_WHITE 0xFFFFFFFF
  182. #define COLOR_WHITESMOKE 0xF5F5F5FF
  183. #define COLOR_WINDOW 0xFFFFFFFF
  184. #define COLOR_WINDOWFRAME 0x646464FF
  185. #define COLOR_WINDOWTEXT 0x000000FF
  186. #define COLOR_YELLOW 0xFFFF00FF
  187. #define COLOR_YELLOWGREEN 0x9ACD32FF
  188. #define STEALTH_ORANGE 0xFF880000
  189. #define STEALTH_OLIVE 0x66660000
  190. #define STEALTH_GREEN 0x33DD1100
  191. #define STEALTH_PINK 0xFF22EE00
  192. #define STEALTH_BLUE 0x0077BB00
  193.  
  194. new ooc = 0;
  195.  
  196. enum cVars
  197. {
  198.     Admin,
  199.     Skin,
  200.     Money,
  201.     Float:  LastX,
  202.     Float:  LastY,
  203.     Float:  LastZ,
  204.     Float:  LastA
  205. }
  206.  
  207. new pInfo[MAX_PLAYERS][cVars];
  208.  
  209.  
  210. //user config stuff
  211. forward LoadPlayer_info ( playerid, name[], value[] );
  212. public LoadPlayer_info ( playerid, name[], value[] )
  213. {
  214.     INI_Int("admin", pInfo[playerid][Admin]);
  215.     INI_Int("money", pInfo[playerid][Money]);
  216.     INI_Int("skin", pInfo[playerid][Skin]);
  217.     INI_Int("locx", pInfo[playerid][LastX]);
  218.     INI_Int("locy", pInfo[playerid][LastY]);
  219.     INI_Int("locz", pInfo[playerid][LastZ]);
  220.     INI_Int("locr", pInfo[playerid][LastA]);
  221.     return true;
  222. }
  223.  
  224. main()
  225. {
  226.     print("\n----------------------------------");
  227.     print(" Blank Gamemode by your name here");
  228.     print("----------------------------------\n");
  229. }
  230.  
  231.  
  232. public OnGameModeInit()
  233. {
  234.  
  235.     // Don't use these lines if it's a filterscript
  236.     SetGameModeText("Nate's RP");
  237.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  238.     AddPlayerClass(1, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  239.     AddPlayerClass(2, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  240.     AddPlayerClass(3, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  241.     AddPlayerClass(4, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  242.     AddPlayerClass(275, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  243.    
  244.     //add vehicles
  245.     AddStaticVehicle(596,2037.8000500,1343.5999800,10.5000000,0.0000000,0,3); //Police Car (LSPD)
  246.     AddStaticVehicle(490,2037.9000200,1335.4000200,11.0000000,0.0000000,0,3); //FBI Rancher
  247.     AddStaticVehicle(514,2037.8000500,1325.8000500,11.4000000,0.0000000,3,3); //Tanker
  248.     AddStaticVehicle(584,2037.9000200,1309.5999800,11.8000000,0.0000000,245,245); //Trailer 3
  249.     AddStaticVehicle(596,2036.5000000,1350.5000000,10.6000000,0.0000000,0,44); //Police Car (LSPD)
  250.  
  251.  
  252.  
  253.  
  254.     return 1;
  255. }
  256.  
  257. public OnGameModeExit()
  258. {
  259.     return 1;
  260. }
  261.  
  262. public OnPlayerRequestClass(playerid, classid)
  263. {
  264.     SetPlayerPos(playerid, 1956.705810, 1343.167846, 15.374607);
  265.     SetPlayerFacingAngle(playerid, 269.020812);
  266.     SetPlayerCameraLookAt(playerid, 1956.705810, 1343.167846, 15.374607);
  267.     SetPlayerCameraPos(playerid, 1956.705810 + (5 * floatsin(-269.020812, degrees)), 1343.167846 + (5 * floatcos(-269.020812, degrees)), 15.374607);
  268.     return 1;
  269. }
  270.  
  271. public OnPlayerConnect(playerid)
  272. {
  273.  
  274.     new userStr [ 64 ];
  275.     new plName [ MAX_PLAYER_NAME ];
  276.  
  277.     GetPlayerName(playerid, plName, MAX_PLAYER_NAME); // Get the players name
  278.     format ( userStr, 64, "users/%s.ini", plName ); // Format the directory for their file
  279.  
  280.     if( fexist ( userStr ) ) // If their file exists...
  281.     {
  282.         // Load it and show them a login box(?)
  283.         //ShowPlayerDialog ( playerid, ...
  284.  
  285.         INI_ParseFile ( userStr, "LoadPlayer_%s", .bExtra = true, .extra = playerid ); // Load their info you just created.
  286.         SetSpawnInfo(playerid, 0, pInfo[playerid][Skin], pInfo[playerid][LastX], pInfo[playerid][LastY], pInfo[playerid][LastZ], pInfo[playerid][LastA], 0, 0, 0, 0, 0, 0);
  287.         SpawnPlayer(playerid);
  288.         GivePlayerMoney(playerid, pInfo[playerid][Money]);
  289.  
  290.         //new test[128];
  291.         //format(test, sizeof(test), "pLocx: %s, pLocy: %s, pLocz: %s", pLocx, pLocy,  pLocz);
  292.         //SendClientMessage(playerid, -1, test);
  293.     }
  294.     else // They don't exist..
  295.     {
  296.         new
  297.             INI: myFile = INI_Open ( userStr );
  298.  
  299.         INI_SetTag ( myFile, "info" );
  300.  
  301.         // Variables for a newly registered person
  302.         INI_WriteString(myFile, "name", plName);
  303.         INI_WriteInt(myFile, "admin", 1);
  304.         INI_WriteInt(myFile, "money", 696969);
  305.         INI_WriteInt(myFile, "skin", 1);
  306.         INI_WriteString(myFile, "locx", "1958.3783");
  307.         INI_WriteString(myFile, "locy", "1343.1572");
  308.         INI_WriteString(myFile, "locz", "15.3746");
  309.         INI_WriteString(myFile, "locr", "269.1425");
  310.         INI_Close ( myFile );
  311.  
  312.         INI_ParseFile ( userStr, "LoadPlayer_%s", .bExtra = true, .extra = playerid ); // Load their info you just created.
  313.         SetSpawnInfo(playerid, 0, pInfo[playerid][Skin], pInfo[playerid][LastX], pInfo[playerid][LastY], pInfo[playerid][LastZ], pInfo[playerid][LastA], 0, 0, 0, 0, 0, 0);
  314.         SpawnPlayer(playerid);
  315.         GivePlayerMoney(playerid, pInfo[playerid][Money]);
  316.     }
  317.        
  318.     new Welcome[128];
  319.     format(Welcome, sizeof(Welcome), "Welcome %s!", plName);
  320.     SendClientMessage(playerid, COLOR_LIGHTBLUE, Welcome);
  321.     if(pInfo[playerid][Admin] > 1){
  322.         new adminm[128];
  323.         format(adminm, sizeof(adminm), "Admin level: %s", pInfo[playerid][Admin]);
  324.         SendClientMessage(playerid, COLOR_LIGHTBLUE, adminm);
  325.     }
  326.     return 1;
  327. }
  328.  
  329. public OnPlayerDisconnect(playerid, reason)
  330. {
  331.     //---------------------------------------------------------------------------------------------SAVE STATS
  332.     new userStr [ 64 ];
  333.     new plName [ MAX_PLAYER_NAME ];
  334.  
  335.     GetPlayerName(playerid, plName, MAX_PLAYER_NAME); // Get the players name
  336.     format ( userStr, 64, "users/%s.ini", plName ); // Format the directory for their file
  337.  
  338.     new
  339.         INI: myFile = INI_Open ( userStr );
  340.        
  341.     INI_SetTag ( myFile, "info" );
  342.     INI_WriteInt(myFile, "money", 6969);
  343.     INI_WriteInt(myFile, "skin", 1);
  344.     INI_WriteString(myFile, "locx", "1958.3783");
  345.     INI_WriteString(myFile, "locy", "1343.1572");
  346.     INI_WriteString(myFile, "locz", "15.3746");
  347.     INI_WriteString(myFile, "locr", "269.1425");
  348.     INI_Close ( myFile );
  349.        
  350.     //---------------------------------------------------------------------------------------------SAVE STATS
  351.  
  352.     return 1;
  353. }
  354.  
  355. public OnPlayerSpawn(playerid)
  356. {
  357.  
  358.     //-------------------------------------------------------------------------------------------------
  359.  
  360.     return 1;
  361. }
  362.  
  363. public OnPlayerDeath(playerid, killerid, reason)
  364. {
  365.     return 1;
  366. }
  367.  
  368. public OnVehicleSpawn(vehicleid)
  369. {
  370.     return 1;
  371. }
  372.  
  373. public OnVehicleDeath(vehicleid, killerid)
  374. {
  375.     return 1;
  376. }
  377.  
  378. public OnPlayerText(playerid, text[])
  379. {
  380.     return 1;
  381. }
  382.  
  383. public OnPlayerCommandText(playerid, cmdtext[])
  384. {
  385.     return 0;
  386. }
  387.  
  388. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  389. {
  390.     return 1;
  391. }
  392.  
  393. public OnPlayerExitVehicle(playerid, vehicleid)
  394. {
  395.     return 1;
  396. }
  397.  
  398. public OnPlayerStateChange(playerid, newstate, oldstate)
  399. {
  400.     return 1;
  401. }
  402.  
  403. public OnPlayerEnterCheckpoint(playerid)
  404. {
  405.     return 1;
  406. }
  407.  
  408. public OnPlayerLeaveCheckpoint(playerid)
  409. {
  410.     return 1;
  411. }
  412.  
  413. public OnPlayerEnterRaceCheckpoint(playerid)
  414. {
  415.     return 1;
  416. }
  417.  
  418. public OnPlayerLeaveRaceCheckpoint(playerid)
  419. {
  420.     return 1;
  421. }
  422.  
  423. public OnRconCommand(cmd[])
  424. {
  425.     return 1;
  426. }
  427.  
  428. public OnPlayerRequestSpawn(playerid)
  429. {
  430.     return 1;
  431. }
  432.  
  433. public OnObjectMoved(objectid)
  434. {
  435.     return 1;
  436. }
  437.  
  438. public OnPlayerObjectMoved(playerid, objectid)
  439. {
  440.     return 1;
  441. }
  442.  
  443. public OnPlayerPickUpPickup(playerid, pickupid)
  444. {
  445.     return 1;
  446. }
  447.  
  448. public OnVehicleMod(playerid, vehicleid, componentid)
  449. {
  450.     return 1;
  451. }
  452.  
  453. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  454. {
  455.     return 1;
  456. }
  457.  
  458. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  459. {
  460.     return 1;
  461. }
  462.  
  463. public OnPlayerSelectedMenuRow(playerid, row)
  464. {
  465.     return 1;
  466. }
  467.  
  468. public OnPlayerExitedMenu(playerid)
  469. {
  470.     return 1;
  471. }
  472.  
  473. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  474. {
  475.     return 1;
  476. }
  477.  
  478. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  479. {
  480.     return 1;
  481. }
  482.  
  483. public OnRconLoginAttempt(ip[], password[], success)
  484. {
  485.     return 1;
  486. }
  487.  
  488. public OnPlayerUpdate(playerid)
  489. {
  490.     return 1;
  491. }
  492.  
  493. public OnPlayerStreamIn(playerid, forplayerid)
  494. {
  495.     return 1;
  496. }
  497.  
  498. public OnPlayerStreamOut(playerid, forplayerid)
  499. {
  500.     return 1;
  501. }
  502.  
  503. public OnVehicleStreamIn(vehicleid, forplayerid)
  504. {
  505.     return 1;
  506. }
  507.  
  508. public OnVehicleStreamOut(vehicleid, forplayerid)
  509. {
  510.     return 1;
  511. }
  512.  
  513. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  514. {
  515.     return 1;
  516. }
  517.  
  518. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  519. {
  520.     return 1;
  521. }
  522.  
  523.  
  524.  
  525.  
  526. //RP COMMANDS----------------------------------------
  527. CMD:ooc(playerid, params[])
  528. {
  529.  
  530.     //check if OOC is enalbed
  531.     if(ooc == 1){
  532.  
  533.     new string[128];
  534.     new name[MAX_PLAYER_NAME+1];
  535.     GetPlayerName(playerid, name, sizeof(name));
  536.  
  537.  
  538.     if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /ooc [message]");
  539.     format(string, sizeof(string), "((OOC: %s: %s))", name, params);
  540.     SendClientMessageToAll(-1, string);
  541.     } else if (ooc == 0) {
  542.         SendClientMessage(playerid, -1, "((OOC CHAT DISABLED BY ADMIN))");
  543.         return 1;
  544.     }
  545.    
  546.     return 1;
  547.    
  548. }
  549.  
  550. CMD:newb(playerid, params[])
  551. {
  552.     new string[128];
  553.     new name[MAX_PLAYER_NAME+1];
  554.     GetPlayerName(playerid, name, sizeof(name));
  555.    
  556.     if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /newb [question]");
  557.     format(string, sizeof(string), "((NEWB: %s: %s", name, params);
  558.     SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  559.     return 1;
  560. }
  561.  
  562. CMD:help(playerid, params[])
  563. {
  564.     if(isnull(params)){
  565.         SendClientMessage(playerid, COLOR_RED, "_________________HELP_________________");
  566.         SendClientMessage(playerid, COLOR_YELLOW, "Regular Commands: /help /ooc /me");
  567.         if(IsPlayerAdmin(playerid)){
  568.         SendClientMessage(playerid, COLOR_FUCHSIA, "Admin Commands: /am /aho /ahc /lvo /lvc /lso /lsc /ts");
  569.         SendClientMessage(playerid, COLOR_FUCHSIA, "Admin Commands: /togooc");
  570.         }
  571.         SendClientMessage(playerid, COLOR_RED, "______________________________________");
  572.     }
  573.     return 1;
  574. }
  575.  
  576. CMD:me(playerid, params[])
  577. {
  578.     new string[128];
  579.     new name[MAX_PLAYER_NAME+1];
  580.     GetPlayerName(playerid, name, sizeof(name));
  581.     if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /me [action]");
  582.     format(string, sizeof(string), "* %s %s.", name, params);
  583.     SendClientMessageToAll(0xFF6363FF, string);
  584.     return 1;
  585. }
  586.  
  587. CMD:w(playerid, params[])
  588. {
  589.     new
  590.         message[128],
  591.         id,
  592.         szPlayerName[MAX_PLAYER_NAME],
  593.         szMessage[128];
  594.  
  595.     if(sscanf(params, "us[128]", id, message)) {
  596.         SendClientMessage(playerid, -1, "USAGE: /w [playerid] [message]");
  597.     }
  598.     else
  599.     {
  600.         if(IsPlayerConnected(id))
  601.         {
  602.             if(playerid != id)
  603.             {
  604.                 GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
  605.  
  606.                 format(szMessage, sizeof(szMessage), "Whisper from %s: %s", szPlayerName, message);
  607.                 SendClientMessage(id, -1, szMessage);
  608.  
  609.                 GetPlayerName(id, szPlayerName, MAX_PLAYER_NAME);
  610.  
  611.                 format(szMessage, sizeof(szMessage), "Whisper sent to %s: %s", szPlayerName, message);
  612.                 SendClientMessage(playerid, -1, szMessage);
  613.             }
  614.             else
  615.             {
  616.                 SendClientMessage(playerid, -1, "You cannot whisper to yourself!");
  617.             }
  618.         }
  619.         else
  620.         {
  621.             SendClientMessage(playerid, -1, "The specified player ID is either not connected or has not authenticated.");
  622.         }
  623.     }
  624.     return 1;
  625. }
  626.  
  627. //ADMIN COMMANDS--------------------------------------
  628.      CMD:am(playerid, params[])
  629.     {
  630.         if(IsPlayerAdmin(playerid)){
  631.             new string[128];
  632.            
  633.             new name[MAX_PLAYER_NAME+1];
  634.             GetPlayerName(playerid, name, sizeof(name));
  635.            
  636.             if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /am [message]");
  637.             format(string, sizeof(string), "(ADMIN) %s says %s", name, params);
  638.             SendClientMessageToAll(COLOR_PINK, string);
  639.             return 1;
  640.         } else {
  641.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  642.             return 1;
  643.         }
  644.     }
  645.    
  646.      CMD:ts(playerid, params[])
  647.     {
  648.         if(IsPlayerAdmin(playerid)){
  649.        
  650.             SendClientMessageToAll(COLOR_LIMEGREEN, "TeamSpeak Server: 127.0.0.1");
  651.        
  652.         } else {
  653.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  654.         }
  655.     }
  656.    
  657.      CMD:togooc(playerid, params[])
  658.     {
  659.         if(IsPlayerAdmin(playerid)){
  660.  
  661.             if(ooc == 1){
  662.                 ooc = 0;
  663.                 SendClientMessageToAll(COLOR_LIGHTPINK, "(Info): The global OOC chat has been disabled");
  664.                 return 1;
  665.             } else if(ooc == 0){
  666.                 ooc = 1;
  667.                 SendClientMessageToAll(COLOR_LIGHTPINK, "(Info): The global OOC chat has been enabled");
  668.                 return 1;
  669.             }
  670.  
  671.         } else {
  672.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  673.             return 1;
  674.         }
  675.         return 1;
  676.     }
  677.  
  678. /*
  679.    CMD:getmoney(playerid, params[])
  680.   {
  681.     if(IsPlayerAdmin(playerid)){
  682.         new string[128];
  683.         new name[MAX_PLAYER_NAME+1];
  684.         GetPlayerName(playerid, name, sizeof(name));
  685.         format(string, sizeof(string), "Recieved $%s.", params);
  686.         SendClientMessage(playerid, COLOR_RED, string);
  687.        
  688.         GivePlayerMoney(playerid, params);
  689.  
  690.         return 1;
  691.     } else {
  692.         SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  693.         return 1;
  694.     }
  695.   }*/
  696. /*
  697.     CMD:od(playerid, params[])
  698.     {
  699.         if(IsPlayerAdmin(playerid)){
  700.        
  701.             new name[MAX_PLAYER_NAME+1];
  702.             GetPlayerName(playerid, name, sizeof(name));
  703.  
  704.             if(params == "1"){
  705.            
  706.             } else if (params == "0"){
  707.            
  708.             }
  709.        
  710.         } else {
  711.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  712.             return 1;
  713.         }
  714.         return 1;
  715.     }
  716.  */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement