Advertisement
Guest User

nateRP

a guest
Mar 5th, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 32.23 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 <YSI\y_commands>
  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. #define     INT_CONSOLE     "{7EBA1E}"
  195. #define     INT_SILVER      "{E5EBDD}"
  196. #define     INT_YELLOW      "{F2E41D}"
  197. #define     INT_RED         "{EB1010}"
  198.  
  199. //---------------------------------------------------------------------------------------------------------START CHECKING CAR
  200.  
  201. new VehicleNames[][] =
  202. {
  203.     "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
  204.     "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
  205.     "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  206.     "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
  207.     "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
  208.     "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
  209.     "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
  210.     "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
  211.     "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
  212.     "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
  213.     "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
  214.     "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
  215.     "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
  216.     "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
  217.     "Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin",
  218.     "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
  219.     "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
  220.     "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
  221.     "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  222.     "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
  223.     "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
  224.     "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
  225.     "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
  226.     "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
  227.     "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  228.     "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
  229.     "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
  230.     "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  231.     "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
  232.     "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
  233.     "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
  234.     "Tiller", "Utility Trailer"
  235. };
  236.  
  237. stock GetVehicleName(vehicleid)
  238. {
  239.     new vname[128];
  240.     format(vname, sizeof(vname),"%s",VehicleNames[vehicleid - 400]);
  241.     return vname;
  242. }
  243. //---------------------------------------------------------------------------------------------------------END CHECKING CAR
  244.  
  245. new ValidCivilianSkins [ ] =
  246. {
  247.     1, 2, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  248.     25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
  249.     43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
  250.     61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79,
  251.     80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
  252.     98, 99, 100, 101, 121, 122, 128, 129, 131, 132, 133, 134, 135, 136, 137,
  253.     138, 139, 140, 141, 142, 143, 145, 146, 147, 148, 150, 151, 152, 153,
  254.     154, 155, 156, 157, 158, 159, 160, 161, 162, 167, 168, 169, 170, 171,
  255.     172, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
  256.     191, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
  257.     207, 208, 209, 210, 212, 213, 214, 215, 216, 218, 219, 220, 221, 222,
  258.     223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
  259.     237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 249, 250, 251, 252,
  260.     253, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 290, 291, 292,
  261.     293, 296, 297, 298, 299
  262. };
  263.  
  264.  
  265.  
  266.  
  267.  
  268. new ooc = 0;
  269.  
  270. enum cVars
  271. {
  272.     Name[128],
  273.     Password[128],
  274.     Admin,
  275.     Skin,
  276.     Money,
  277.     Float:  LastX,
  278.     Float:  LastY,
  279.     Float:  LastZ,
  280.     Float:  LastA
  281. }
  282.  
  283. enum
  284. {
  285.     DIALOG_NEWPLAYER,
  286.     DIALOG_EXISTINGPLAYER,
  287.     DIALOG_EXISTINGPLAYER_INV
  288. }
  289.  
  290. new pInfo[MAX_PLAYERS][cVars];
  291.  
  292.  
  293. //user config stuff
  294. forward LoadPlayer_info ( playerid, name[], value[] );
  295. public LoadPlayer_info ( playerid, name[], value[] )
  296. {
  297.     INI_String("name", pInfo[playerid][Name], 128);
  298.     INI_String("password", pInfo[playerid][Password], 128);
  299.     INI_Int("admin", pInfo[playerid][Admin]);
  300.     INI_Int("money", pInfo[playerid][Money]);
  301.     INI_Int("skin", pInfo[playerid][Skin]);
  302.     INI_Float("locx", pInfo[playerid][LastX]);
  303.     INI_Float("locy", pInfo[playerid][LastY]);
  304.     INI_Float("locz", pInfo[playerid][LastZ]);
  305.     INI_Float("locr", pInfo[playerid][LastA]);
  306.     return true;
  307. }
  308.  
  309. main()
  310. {
  311.     print("\n----------------------------------");
  312.     print(" Blank Gamemode by your name here");
  313.     print("----------------------------------\n");
  314. }
  315.  
  316.  
  317. public OnGameModeInit()
  318. {
  319.  
  320.     // Don't use these lines if it's a filterscript
  321.     SetGameModeText("Nate's RP");
  322.     LimitGlobalChatRadius(200.0); // Global Chat Radius
  323.  
  324.     //add vehicles
  325.     AddStaticVehicle(596,2037.8000500,1343.5999800,10.5000000,0.0000000,0,3); //Police Car (LSPD)
  326.     AddStaticVehicle(490,2037.9000200,1335.4000200,11.0000000,0.0000000,0,3); //FBI Rancher
  327.     AddStaticVehicle(514,2037.8000500,1325.8000500,11.4000000,0.0000000,3,3); //Tanker
  328.     AddStaticVehicle(584,2037.9000200,1309.5999800,11.8000000,0.0000000,245,245); //Trailer 3
  329.     AddStaticVehicle(596,2036.5000000,1350.5000000,10.6000000,0.0000000,0,44); //Police Car (LSPD)
  330.  
  331.  
  332.  
  333.  
  334.     return 1;
  335. }
  336.  
  337. public OnGameModeExit()
  338. {
  339.     return 1;
  340. }
  341.  
  342. public OnPlayerRequestClass(playerid, classid)
  343. {
  344.     /*SetPlayerPos(playerid, 1956.705810, 1343.167846, 15.374607);
  345.     SetPlayerFacingAngle(playerid, 269.020812);
  346.     SetPlayerCameraLookAt(playerid, 1956.705810, 1343.167846, 15.374607);*/
  347.     return 1;
  348. }
  349.  
  350. public OnPlayerConnect(playerid)
  351. {
  352.  
  353.     new userStr [ 64 ];
  354.     new plName [ MAX_PLAYER_NAME ];
  355.  
  356.     GetPlayerName(playerid, plName, MAX_PLAYER_NAME); // Get the players name
  357.     format ( userStr, 64, "users/%s.ini", plName ); // Format the directory for their file
  358.  
  359.     if( fexist ( userStr ) ) // If their file exists...
  360.     {
  361.         // Load it and show them a login box(?)
  362.         //ShowPlayerDialog ( playerid, ...
  363.  
  364.         INI_ParseFile ( userStr, "LoadPlayer_%s", .bExtra = true, .extra = playerid ); // Load their info you just created.
  365.        
  366.         ShowDialog(playerid, DIALOG_EXISTINGPLAYER);
  367.  
  368.         /*SetSpawnInfo(playerid, 0, pInfo[playerid][Skin], pInfo[playerid][LastX], pInfo[playerid][LastY], pInfo[playerid][LastZ], pInfo[playerid][LastA], 0, 0, 0, 0, 0, 0);
  369.         SpawnPlayer(playerid);
  370.         GivePlayerMoney(playerid, pInfo[playerid][Money]);*/
  371.  
  372.        
  373.     }
  374.     else // They don't exist..
  375.     {
  376.         ShowDialog(playerid, DIALOG_NEWPLAYER);
  377.     }
  378.     return 1;
  379. }
  380.  
  381. public OnPlayerDisconnect(playerid, reason)
  382. {
  383.  
  384.     if(IsPlayerInAnyVehicle(playerid)){
  385.         RemovePlayerFromVehicle(playerid);
  386.     }
  387.     //---------------------------------------------------------------------------------------------SAVE STATS
  388.     new userStr [ 64 ];
  389.     new plName [ MAX_PLAYER_NAME ];
  390.  
  391.     GetPlayerName(playerid, plName, MAX_PLAYER_NAME); // Get the players name
  392.     format ( userStr, 64, "users/%s.ini", plName ); // Format the directory for their file
  393.  
  394.     new
  395.         Float:newX,
  396.         Float:newY,
  397.         Float:newZ,
  398.         Float:newR;
  399.        
  400.     GetPlayerPos(playerid, newX, newY, newZ);
  401.     GetPlayerFacingAngle(playerid, newR);
  402.    
  403.     new
  404.         INI: myFile = INI_Open ( userStr );
  405.  
  406.     INI_SetTag ( myFile, "info" );
  407.     INI_WriteInt(myFile, "money", pInfo[playerid][Money]);
  408.     INI_WriteInt(myFile, "skin", pInfo[playerid][Skin]);
  409.     INI_WriteFloat(myFile, "locx", newX);
  410.     INI_WriteFloat(myFile, "locy", newY);
  411.     INI_WriteFloat(myFile, "locz", newZ);
  412.     INI_WriteFloat(myFile, "locr", newR);
  413.     INI_Close ( myFile );
  414.  
  415.     //---------------------------------------------------------------------------------------------SAVE STATS
  416.  
  417.     return 1;
  418. }
  419.  
  420. public OnPlayerSpawn(playerid)
  421. {
  422.  
  423.     TogglePlayerControllable ( playerid, true );
  424.     SetCameraBehindPlayer(playerid);
  425.     //-------------------------------------------------------------------------------------------------
  426.  
  427.     return 1;
  428. }
  429.  
  430. public OnPlayerDeath(playerid, killerid, reason)
  431. {
  432.     return 1;
  433. }
  434.  
  435. public OnVehicleSpawn(vehicleid)
  436. {
  437.     return 1;
  438. }
  439.  
  440. public OnVehicleDeath(vehicleid, killerid)
  441. {
  442.     return 1;
  443. }
  444.  
  445. public OnPlayerText(playerid, text[])
  446. {
  447.     return 1;
  448. }
  449.  
  450. public OnPlayerCommandText(playerid, cmdtext[])
  451. {
  452.     return 0;
  453. }
  454.  
  455. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  456. {
  457.     return 1;
  458. }
  459.  
  460. public OnPlayerExitVehicle(playerid, vehicleid)
  461. {
  462.     return 1;
  463. }
  464.  
  465. public OnPlayerStateChange(playerid, newstate, oldstate)
  466. {
  467.     return 1;
  468. }
  469.  
  470. public OnPlayerEnterCheckpoint(playerid)
  471. {
  472.     return 1;
  473. }
  474.  
  475. public OnPlayerLeaveCheckpoint(playerid)
  476. {
  477.     return 1;
  478. }
  479.  
  480. public OnPlayerEnterRaceCheckpoint(playerid)
  481. {
  482.     return 1;
  483. }
  484.  
  485. public OnPlayerLeaveRaceCheckpoint(playerid)
  486. {
  487.     return 1;
  488. }
  489.  
  490. public OnRconCommand(cmd[])
  491. {
  492.     return 1;
  493. }
  494.  
  495. public OnPlayerRequestSpawn(playerid)
  496. {
  497.     return 1;
  498. }
  499.  
  500. public OnObjectMoved(objectid)
  501. {
  502.     return 1;
  503. }
  504.  
  505. public OnPlayerObjectMoved(playerid, objectid)
  506. {
  507.     return 1;
  508. }
  509.  
  510. public OnPlayerPickUpPickup(playerid, pickupid)
  511. {
  512.     return 1;
  513. }
  514.  
  515. public OnVehicleMod(playerid, vehicleid, componentid)
  516. {
  517.     return 1;
  518. }
  519.  
  520. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  521. {
  522.     return 1;
  523. }
  524.  
  525. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  526. {
  527.     return 1;
  528. }
  529.  
  530. public OnPlayerSelectedMenuRow(playerid, row)
  531. {
  532.     return 1;
  533. }
  534.  
  535. public OnPlayerExitedMenu(playerid)
  536. {
  537.     return 1;
  538. }
  539.  
  540. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  541. {
  542.     return 1;
  543. }
  544.  
  545. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  546. {
  547.     return 1;
  548. }
  549.  
  550. public OnRconLoginAttempt(ip[], password[], success)
  551. {
  552.     return 1;
  553. }
  554.  
  555. public OnPlayerUpdate(playerid)
  556. {
  557.     return 1;
  558. }
  559.  
  560. public OnPlayerStreamIn(playerid, forplayerid)
  561. {
  562.     return 1;
  563. }
  564.  
  565. public OnPlayerStreamOut(playerid, forplayerid)
  566. {
  567.     return 1;
  568. }
  569.  
  570. public OnVehicleStreamIn(vehicleid, forplayerid)
  571. {
  572.     return 1;
  573. }
  574.  
  575. public OnVehicleStreamOut(vehicleid, forplayerid)
  576. {
  577.     return 1;
  578. }
  579.  
  580. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  581. {
  582.     switch ( dialogid )
  583.     {
  584.         case DIALOG_NEWPLAYER:
  585.         {
  586.             new userStr [ 64 ];
  587.             new plName [ MAX_PLAYER_NAME ];
  588.             new rand = random(sizeof(ValidCivilianSkins));
  589.  
  590.             GetPlayerName(playerid, plName, MAX_PLAYER_NAME); // Get the players name
  591.             format ( userStr, 64, "users/%s.ini", plName ); // Format the directory for their file
  592.        
  593.             new
  594.                 INI: myFile = INI_Open ( userStr );
  595.  
  596.             INI_SetTag ( myFile, "info" );
  597.  
  598.             // Variables for a newly registered person
  599.             INI_WriteString(myFile, "name", plName);
  600.             INI_WriteString(myFile, "password", inputtext);
  601.             INI_WriteInt(myFile, "admin", 1);
  602.             INI_WriteInt(myFile, "money", 696969);
  603.             INI_WriteInt(myFile, "skin", ValidCivilianSkins[rand]);
  604.             INI_WriteFloat(myFile, "locx", 1958.3783);
  605.             INI_WriteFloat(myFile, "locy", 1343.1572);
  606.             INI_WriteFloat(myFile, "locz", 15.3746);
  607.             INI_WriteFloat(myFile, "locr", 269.1425);
  608.             INI_Close ( myFile );
  609.  
  610.             INI_ParseFile ( userStr, "LoadPlayer_%s", .bExtra = true, .extra = playerid ); // Load their info you just created.
  611.            
  612.             SetSpawnInfo(playerid, 0, pInfo[playerid][Skin], pInfo[playerid][LastX], pInfo[playerid][LastY], pInfo[playerid][LastZ], pInfo[playerid][LastA], 0, 0, 0, 0, 0, 0);
  613.             SpawnPlayer(playerid);
  614.        
  615.             GivePlayerMoney(playerid, pInfo[playerid][Money]);
  616.        
  617.  
  618.             new Welcome[128];
  619.             format(Welcome, sizeof(Welcome), "Thankyou for registering, %s! Your password is: (%s)", plName, pInfo[playerid][Password]);
  620.             SendClientMessage(playerid, COLOR_LIGHTBLUE, Welcome);
  621.            
  622.            
  623.        
  624.         }
  625.        
  626.         case DIALOG_EXISTINGPLAYER:
  627.         {
  628.             if ( !response )
  629.             {
  630.                 // Not their account!
  631.             }
  632.  
  633.             if( strcmp(pInfo[playerid][Password], inputtext, false ) == 0 && !isnull ( inputtext ) )
  634.             {
  635.                
  636.                 SetSpawnInfo(playerid, 0, pInfo[playerid][Skin], pInfo[playerid][LastX], pInfo[playerid][LastY], pInfo[playerid][LastZ], pInfo[playerid][LastA], 0, 0, 0, 0, 0, 0);
  637.                 SpawnPlayer(playerid);
  638.                 GivePlayerMoney(playerid, pInfo[playerid][Money]);
  639.                
  640.                 new welcome[128];
  641.                 format(welcome, sizeof(welcome), "Welcome back, %s", pInfo[playerid][Name]);
  642.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, welcome);
  643.                 if(pInfo[playerid][Admin] > 1){
  644.                     new adminm[128];
  645.                     format(adminm, sizeof(adminm), "Admin level: %i", pInfo[playerid][Admin]);
  646.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, adminm);
  647.                 }
  648.                 new test[128];
  649.                 format(test, sizeof(test), "Your Skin is: %i", pInfo[playerid][Skin]);
  650.                 SendClientMessage(playerid, COLOR_LIMEGREEN, test);
  651.                
  652.             } else {
  653.                 new errorstring[128];
  654.                 format(errorstring, sizeof(errorstring), "%s tried to logon using the wrong password!", pInfo[playerid][Name]);
  655.                 SendClientMessageToAll(COLOR_LIGHTPINK, errorstring);
  656.                 ShowDialog(playerid, DIALOG_EXISTINGPLAYER_INV);
  657.             }
  658.         }
  659.     }
  660. }
  661.  
  662. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  663. {
  664.     return 1;
  665. }
  666.  
  667.  
  668.  
  669.  
  670.  
  671. /*
  672. ===================================================================================
  673. ===============================DIALOGS=====HERE====================================
  674. ===================================================================================
  675. */
  676. stock ShowDialog ( playerid, dialogid )
  677. {
  678.     switch ( dialogid )
  679.     {
  680.         case DIALOG_NEWPLAYER:
  681.         {
  682.             ShowPlayerDialog ( playerid, DIALOG_NEWPLAYER, DIALOG_STYLE_PASSWORD, ""#INT_CONSOLE"Please enter a password..", ""#INT_SILVER"Our records show that you haven't played on our server before./n/nEnter a password below begin!", "OK", "" );
  683.         }
  684.         case DIALOG_EXISTINGPLAYER:
  685.         {
  686.             ShowPlayerDialog ( playerid, DIALOG_EXISTINGPLAYER, DIALOG_STYLE_PASSWORD, ""#INT_CONSOLE"Please enter your password..", ""#INT_SILVER"Welcome back! Please enter your unique password to be/n/nplaced where you left off", "OK", "Not Me" );
  687.         }
  688.         case DIALOG_EXISTINGPLAYER_INV:
  689.         {
  690.             ShowPlayerDialog ( playerid, DIALOG_EXISTINGPLAYER, DIALOG_STYLE_PASSWORD, ""#INT_CONSOLE"Please enter your password..", ""#INT_RED"** You have entered an invalid password!\n\n"#INT_SILVER"Welcome back! Please enter your unique password to be/n/nplaced where you left off", "OK", "Not Me" );
  691.         }
  692.        
  693.     }
  694.     return true;
  695. }
  696.  
  697.  
  698.  
  699.  
  700. //RP COMMANDS----------------------------------------
  701. CMD:ooc(playerid, params[])
  702. {
  703.  
  704.     //check if OOC is enalbed
  705.     if(ooc == 1){
  706.  
  707.     new string[128];
  708.     new name[MAX_PLAYER_NAME+1];
  709.     GetPlayerName(playerid, name, sizeof(name));
  710.  
  711.  
  712.     if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /ooc [message]");
  713.     format(string, sizeof(string), "((OOC: %s: %s))", name, params);
  714.     SendClientMessageToAll(-1, string);
  715.     } else if (ooc == 0) {
  716.         SendClientMessage(playerid, -1, "((OOC CHAT DISABLED BY ADMIN))");
  717.         return 1;
  718.     }
  719.  
  720.     return 1;
  721.  
  722. }
  723.  
  724. CMD:newb(playerid, params[])
  725. {
  726.     new string[128];
  727.     new name[MAX_PLAYER_NAME+1];
  728.     GetPlayerName(playerid, name, sizeof(name));
  729.  
  730.     if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /newb [question]");
  731.     format(string, sizeof(string), "((NEWB: %s: %s))", name, params);
  732.     SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  733.     return 1;
  734. }
  735.  
  736. CMD:help(playerid, params[])
  737. {
  738.     if(isnull(params)){
  739.         SendClientMessage(playerid, COLOR_RED, "_________________HELP_________________");
  740.         SendClientMessage(playerid, COLOR_YELLOW, "Regular Commands: /help /ooc /me /carkick");
  741.         if(pInfo[playerid][Admin] > 1){
  742.         SendClientMessage(playerid, COLOR_FUCHSIA, "Admin Commands: /am /aho /ahc /lvo /lvc /lso /lsc /ts");
  743.         SendClientMessage(playerid, COLOR_FUCHSIA, "Admin Commands: /togooc /v /giveskin");
  744.         }
  745.         SendClientMessage(playerid, COLOR_RED, "______________________________________");
  746.     }
  747.     return 1;
  748. }
  749.  
  750. CMD:me(playerid, params[])
  751. {
  752.     new string[128];
  753.     new name[MAX_PLAYER_NAME+1];
  754.     GetPlayerName(playerid, name, sizeof(name));
  755.     if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /me [action]");
  756.     format(string, sizeof(string), "* %s %s.", name, params);
  757.     SendClientMessageToAll(0xFF6363FF, string);
  758.     return 1;
  759. }
  760.  
  761. CMD:w(playerid, params[])
  762. {
  763.     new
  764.         message[128],
  765.         id,
  766.         szPlayerName[MAX_PLAYER_NAME],
  767.         szMessage[128];
  768.  
  769.     if(sscanf(params, "us[128]", id, message)) {
  770.         SendClientMessage(playerid, -1, "USAGE: /w [playerid] [message]");
  771.     }
  772.     else
  773.     {
  774.         if(IsPlayerConnected(id))
  775.         {
  776.             if(playerid != id)
  777.             {
  778.                 GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
  779.  
  780.                 format(szMessage, sizeof(szMessage), "Whisper from %s: %s", szPlayerName, message);
  781.                 SendClientMessage(id, -1, szMessage);
  782.  
  783.                 GetPlayerName(id, szPlayerName, MAX_PLAYER_NAME);
  784.  
  785.                 format(szMessage, sizeof(szMessage), "Whisper sent to %s: %s", szPlayerName, message);
  786.                 SendClientMessage(playerid, -1, szMessage);
  787.             }
  788.             else
  789.             {
  790.                 SendClientMessage(playerid, -1, "You cannot whisper to yourself!");
  791.             }
  792.         }
  793.         else
  794.         {
  795.             SendClientMessage(playerid, -1, "The specified player ID is either not connected or has not authenticated.");
  796.         }
  797.     }
  798.     return 1;
  799. }
  800.  
  801.      CMD:carkick(playerid, params[])
  802.     {
  803.         new
  804.             kickid,
  805.             carid,
  806.             kickcarid;
  807.         new kickname[MAX_PLAYER_NAME];
  808.         new hostname[MAX_PLAYER_NAME];
  809.         if(IsPlayerInAnyVehicle(playerid)){
  810.        
  811.                 if(GetPlayerState(playerid) == 2){
  812.                
  813.                     if(!sscanf(params, "i", kickid)) {
  814.                    
  815.                         if(kickid != playerid){
  816.                            
  817.                             if(IsPlayerInAnyVehicle(kickid)){
  818.                            
  819.                                 carid = GetPlayerVehicleID(playerid);
  820.                                 kickcarid = GetPlayerVehicleID(kickid);
  821.                                
  822.                                 if(carid == kickcarid){
  823.                                
  824.                                         GetPlayerName(kickid, kickname, MAX_PLAYER_NAME);
  825.                                         GetPlayerName(playerid, hostname, MAX_PLAYER_NAME);
  826.                                         //kick player
  827.                                         new messagetohost[128];
  828.                                         new messagetokick[128];
  829.                                        
  830.                                         format(messagetohost, sizeof(messagetohost), "%s has been kicked from your car!", kickname);
  831.                                         format(messagetokick, sizeof(messagetokick), "%s has kicked you from their car!", hostname);
  832.                                        
  833.                                         SendClientMessage(playerid, COLOR_LIGHTPINK, messagetohost);
  834.                                         SendClientMessage(kickid, COLOR_LIGHTPINK, messagetokick);
  835.                                        
  836.                                         RemovePlayerFromVehicle(kickid);
  837.                                         return true;
  838.                                        
  839.                                 } else {
  840.                                     SendClientMessage(playerid, COLOR_LIGHTPINK, "ERROR: That player isn't in your vehicle!");
  841.                                 }
  842.                            
  843.                             } else {
  844.                                 SendClientMessage(playerid, COLOR_LIGHTPINK, "ERROR: That player isn't in your vehicle!");
  845.                             }
  846.                            
  847.                        
  848.                         } else {
  849.                             SendClientMessage(playerid, COLOR_LIGHTPINK, "ERROR: You can't kick yourself!");
  850.                         }
  851.                    
  852.                     } else {
  853.                         SendClientMessage(playerid, -1, "USAGE: /carkick [id]");
  854.                     }
  855.                 } else {
  856.                     SendClientMessage(playerid, COLOR_LIGHTPINK, "ERROR: You must be the driver to perform '/carkick'");
  857.                 }
  858.        
  859.         } else {
  860.             SendClientMessage(playerid, COLOR_LIGHTPINK, "ERROR: You must be in a vehicle to perform '/carkick'");
  861.         }
  862.    
  863.         return 1;
  864.    
  865.     }
  866.  
  867. //ADMIN COMMANDS--------------------------------------
  868.      CMD:am(playerid, params[])
  869.     {
  870.         if(pInfo[playerid][Admin] > 1){
  871.             new string[128];
  872.  
  873.             new name[MAX_PLAYER_NAME+1];
  874.             GetPlayerName(playerid, name, sizeof(name));
  875.  
  876.             if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /am [message]");
  877.             format(string, sizeof(string), "(ADMIN) %s says %s", name, params);
  878.             SendClientMessageToAll(COLOR_PINK, string);
  879.             return 1;
  880.         } else {
  881.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  882.             return 1;
  883.         }
  884.     }
  885.  
  886.      CMD:ts(playerid, params[])
  887.     {
  888.         if(pInfo[playerid][Admin] > 1){
  889.  
  890.             SendClientMessageToAll(COLOR_LIMEGREEN, "TeamSpeak Server: 127.0.0.1");
  891.             return 1;
  892.  
  893.         } else {
  894.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  895.             return 1;
  896.         }
  897.     }
  898.  
  899.      CMD:togooc(playerid, params[])
  900.     {
  901.         if(pInfo[playerid][Admin] > 1){
  902.    
  903.             new
  904.                 aname[28],
  905.                 ooctogm[128];
  906.             GetPlayerName(playerid, aname, sizeof(aname))
  907.            
  908.             if(ooc == 1){
  909.                 ooc = 0;
  910.                 format(ooctogm, sizeof(ooctogm), "(Info): The global OOC chat has been disabled by %s", aname);
  911.                 SendClientMessageToAll(COLOR_LIGHTPINK, ooctogm);
  912.                 return 1;
  913.             } else if(ooc == 0){
  914.                 ooc = 1;
  915.                 format(ooctogm, sizeof(ooctogm), "(Info): The global OOC chat has been enabled by %s", aname);
  916.                 SendClientMessageToAll(COLOR_LIGHTPINK, ooctogm);
  917.                 return 1;
  918.             }
  919.  
  920.         } else {
  921.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  922.             return 1;
  923.         }
  924.         return 1;
  925.     }
  926.    
  927.     CMD:v(playerid, params[])
  928.     {
  929.         new
  930.             toid,
  931.             carid,
  932.             color1,
  933.             color2;
  934.            
  935.         if(pInfo[playerid][Admin] > 1){
  936.  
  937.              if(!sscanf(params, "iiii", toid, carid, color1, color2)) {
  938.                
  939.                 if(IsPlayerConnected(toid)){
  940.                     if(carid >399 && carid < 612){
  941.                     new
  942.                         Float: curX,
  943.                         Float: curY,
  944.                         Float: curZ,
  945.                         Float: curR;
  946.                        
  947.                     GetPlayerPos(toid, curX, curY, curZ);
  948.                     GetPlayerFacingAngle(playerid, curR);
  949.                     CreateVehicle(carid, curX+1, curY+1, curZ, curR, color1, color2, -1);
  950.                        
  951.                     new MessageToSender[128];
  952.                     new MessageToReciever[128];
  953.                     new SenderName[25];
  954.                     new RecieverName[25];
  955.                        
  956.                     GetPlayerName(playerid, SenderName, 18);
  957.                     GetPlayerName(toid, RecieverName, 18);
  958.                        
  959.                     format(MessageToSender, sizeof(MessageToSender), "Car '%s' sent to %s.",  GetVehicleName(carid), RecieverName);
  960.                     format(MessageToReciever, sizeof(MessageToReciever), "%s has just spawned you a car (%s).", SenderName, GetVehicleName(carid));
  961.                     SendClientMessage(playerid, COLOR_LIGHTPINK, MessageToSender);
  962.                     SendClientMessage(toid, COLOR_LIGHTPINK, MessageToReciever);
  963.                    
  964.                     return true;
  965.  
  966.                     } else {
  967.                         new errorstring[128];
  968.                         format(errorstring, sizeof(errorstring), "ERROR: %i is not a valid car id!", carid);
  969.                         SendClientMessage(playerid, COLOR_LIGHTPINK, errorstring);
  970.                     }
  971.                    
  972.                 } else {
  973.                     new errorstring[128];
  974.                     format(errorstring, sizeof(errorstring), "ERROR: %i is not a valid player!", toid);
  975.                     SendClientMessage(playerid, COLOR_LIGHTPINK, errorstring);
  976.                 }
  977.  
  978.              } else {
  979.                 SendClientMessage(playerid, -1, "USAGE: /v [playerid] [car] [color1] [color2]");
  980.              }
  981.  
  982.         } else {
  983.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  984.         }
  985.         return 1;
  986.     }
  987.    
  988.      CMD:giveskin(playerid, params[])
  989.     {
  990.            
  991.         if(pInfo[playerid][Admin] > 1){
  992.            
  993.             new
  994.                 skinid,
  995.                 rid,
  996.                 aname[MAX_PLAYER_NAME],
  997.                 rname[MAX_PLAYER_NAME];
  998.            
  999.             if(!sscanf(params, "ii", rid, skinid)) {
  1000.            
  1001.                 if(IsPlayerConnected(rid)){
  1002.                    
  1003.                     //set skin
  1004.                     SetPlayerSkin(rid, skinid);
  1005.                     pInfo[rid][Skin] = skinid;
  1006.                        
  1007.                     new amessage[128];
  1008.                     new rmessage[128];
  1009.                    
  1010.                     GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
  1011.                     GetPlayerName(rid, rname, MAX_PLAYER_NAME);
  1012.                    
  1013.                     format(amessage, sizeof(amessage), "Skin ID (%i) sent to %s", skinid, rname);
  1014.                     format(rmessage, sizeof(rmessage), "%s has set your skin! (SkinID:%i)", aname, skinid);
  1015.                        
  1016.                     SendClientMessage(playerid, COLOR_LIGHTPINK, amessage);
  1017.                     SendClientMessage(rid, COLOR_LIGHTPINK, rmessage);
  1018.                
  1019.                 } else {
  1020.                     SendClientMessage(playerid, COLOR_LIGHTPINK, "ERROR: This player is not connected!");
  1021.                 }
  1022.            
  1023.             } else {
  1024.                 SendClientMessage(playerid, -1, "USAGE: /giveskin [playerid] [skinid]");
  1025.             }
  1026.            
  1027.         } else {
  1028.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  1029.         }
  1030.        
  1031.         return 1;
  1032.         }
  1033.  
  1034.  
  1035.    CMD:givemoney(playerid, params[])
  1036.   {
  1037.     if(pInfo[playerid][Admin] > 1){
  1038.    
  1039.         new
  1040.             rid,
  1041.             money;
  1042.    
  1043.         if(!sscanf(params, "ii", rid, money)) {
  1044.        
  1045.             if(IsPlayerConnected(rid)){
  1046.            
  1047.                 new
  1048.                     aname[MAX_PLAYER_NAME],
  1049.                     rname[MAX_PLAYER_NAME],
  1050.                     amessage[128],
  1051.                     rmessage[128];
  1052.                
  1053.                 GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
  1054.                 GetPlayerName(rid, rname, MAX_PLAYER_NAME);
  1055.                
  1056.                 format(amessage, sizeof(amessage), "$%i was given to %s!", money, rname);
  1057.                 format(rmessage, sizeof(rmessage), "%s just sent you $%i!", aname, money);
  1058.                
  1059.                 GivePlayerMoney(rid, money);
  1060.                 pInfo[rid][Money] = pInfo[rid][Money] + money;
  1061.                
  1062.                 SendClientMessage(playerid, COLOR_LIGHTPINK, amessage);
  1063.                 SendClientMessage(rid, COLOR_LIGHTPINK, rmessage);
  1064.            
  1065.             } else {
  1066.                 SendClientMessage(playerid, COLOR_LIGHTPINK, "This player is not online!");
  1067.             }
  1068.        
  1069.         } else {
  1070.             SendClientMessage(playerid, -1, "USAGE: /givemoney [playerid] [amount]");
  1071.         }
  1072.    
  1073.     } else {
  1074.         SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  1075.     }
  1076.  
  1077.     return 1;
  1078.   }
  1079. /*
  1080.     CMD:od(playerid, params[])
  1081.     {
  1082.         if(IsPlayerAdmin(playerid)){
  1083.  
  1084.             new name[MAX_PLAYER_NAME+1];
  1085.             GetPlayerName(playerid, name, sizeof(name));
  1086.  
  1087.             if(params == "1"){
  1088.  
  1089.             } else if (params == "0"){
  1090.  
  1091.             }
  1092.  
  1093.         } else {
  1094.             SendClientMessage(playerid, COLOR_LIGHTBLUE, "You don't have access to this command.");
  1095.             return 1;
  1096.         }
  1097.         return 1;
  1098.     }
  1099.  */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement