Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2015
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.44 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 <zcmd>
  7. #include <sscanf2>
  8.  
  9. #pragma tabsize 0
  10.  
  11. #if defined FILTERSCRIPT
  12.  
  13.  
  14. public OnFilterScriptInit()
  15. {
  16.     print("\n--------------------------------------");
  17.     print(" Blank Filterscript by your name here");
  18.     print("--------------------------------------\n");
  19.     return 1;
  20. }
  21.  
  22. public OnFilterScriptExit()
  23. {
  24.     return 1;
  25. }
  26.  
  27. #else
  28.  
  29. main()
  30. {
  31.     print("\n----------------------------------");
  32.     print(" Blank Gamemode by your name here");
  33.     print("----------------------------------\n");
  34. }
  35.  
  36. #endif
  37.  
  38. #define MAKE_COLOR_FROM_RGB(%0,%1,%2,%3) ((((%0) & 0xFF) << 24) | (((%1) & 0xFF) << 16) | (((%2) & 0xFF) << 8) | (((%3) & 0xFF) << 0))
  39.  
  40. enum PlayerData
  41. {
  42.     IdColor,
  43.     ChatColor,
  44.     Color
  45. };
  46. new AccInfo[MAX_PLAYERS][PlayerData];
  47.  
  48.     new colors[] =
  49.     {
  50.         4294967295 //White
  51.     };
  52.  
  53.  
  54. public OnPlayerRequestClass(playerid, classid)
  55. {
  56.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  57.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  58.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  59.     return 1;
  60. }
  61.  
  62. public OnPlayerConnect(playerid)
  63. {
  64.     AccInfo[playerid][IdColor] = 4294967295;
  65.     AccInfo[playerid][ChatColor] = 4294967295;
  66.    
  67.     AccInfo[playerid][Color] = colors[random(sizeof(colors))];
  68.     SetPlayerColor(playerid, AccInfo[playerid][Color]);
  69.     return 1;
  70. }
  71.  
  72. public OnPlayerDisconnect(playerid, reason)
  73. {
  74.     return 1;
  75. }
  76.  
  77. public OnPlayerSpawn(playerid)
  78. {
  79.     return 1;
  80. }
  81.  
  82. public OnPlayerDeath(playerid, killerid, reason)
  83. {
  84.     return 1;
  85. }
  86.  
  87. public OnVehicleSpawn(vehicleid)
  88. {
  89.     return 1;
  90. }
  91.  
  92. public OnPlayerText(playerid, text[])
  93. {
  94.     new string[500];
  95.     if(IsPlayerAdmin(playerid))
  96.         format(string, sizeof(string), "%s {%06x}[%d]: {%06x}%s", GetName(playerid), (AccInfo[playerid][IdColor] >>> 8), playerid, (AccInfo[playerid][ChatColor] >>> 8), text);
  97.     else
  98.         format(string, sizeof(string), "%s {FFFFFF}(%d){%06x}: {FFFFFF}%s", GetName(playerid), playerid, (GetPlayerColor(playerid) >>> 8), text);
  99.     SendClientMessageToAll(GetPlayerColor(playerid), string);
  100.     return 0;
  101. }
  102.  
  103. stock GetName(playerid)
  104. {
  105.     new pName[MAX_PLAYERS];
  106.     GetPlayerName(playerid, pName, sizeof(pName));
  107.     return pName;
  108. }
  109.  
  110. CMD:idcolor(playerid,params[])
  111. {
  112.     if(IsPlayerAdmin(playerid))
  113.     {
  114.         new R, G, B, str[70];
  115.         if (sscanf(params, "ddd", R, G, B)) return SendClientMessage(playerid, 0x6FFF00FF, "{FF0000}USAGE: {BABABA}/idcolor <R> <G> <B> [0-255]" );
  116.         if (R < 0 || R > 255 || G < 0 || G > 255 || B < 0 || B > 255) return SendClientMessage(playerid, -1, "{FF0000}Error: {BABABA}Color R-G-Bs cannot be lower than 0 or higher than 255!");
  117.         AccInfo[playerid][IdColor] = MAKE_COLOR_FROM_RGB(R, G, B, 255);
  118.         format(str, sizeof(str), "{%06x}You have successfully changed your id color!", (AccInfo[playerid][IdColor] >>> 8));
  119.         SendClientMessage(playerid, -1, str);
  120.     }
  121.     return 1;
  122. }
  123. CMD:chatcolor(playerid,params[])
  124. {
  125.     if(IsPlayerAdmin(playerid))
  126.     {
  127.         new R, G, B, str[70];
  128.         if (sscanf(params, "ddd", R, G, B)) return SendClientMessage(playerid, 0x6FFF00FF, "{FF0000}USAGE: {BABABA}/chatcolor <R> <G> <B> [0-255]" );
  129.         if (R < 0 || R > 255 || G < 0 || G > 255 || B < 0 || B > 255) return SendClientMessage(playerid, -1, "{FF0000}Error: {BABABA}Color R-G-Bs cannot be lower than 0 or higher than 255!");
  130.         AccInfo[playerid][ChatColor] = MAKE_COLOR_FROM_RGB(R, G, B, 255);
  131.         format(str, sizeof(str), "{%06x}You have successfully changed your chat color!", (AccInfo[playerid][ChatColor] >>> 8));
  132.         SendClientMessage(playerid, -1, str);
  133.     }
  134.     return 1;
  135. }
  136.  
  137. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  138. {
  139.     return 1;
  140. }
  141.  
  142. public OnPlayerExitVehicle(playerid, vehicleid)
  143. {
  144.     return 1;
  145. }
  146.  
  147. public OnPlayerStateChange(playerid, newstate, oldstate)
  148. {
  149.     return 1;
  150. }
  151.  
  152. public OnPlayerEnterCheckpoint(playerid)
  153. {
  154.     return 1;
  155. }
  156.  
  157. public OnPlayerLeaveCheckpoint(playerid)
  158. {
  159.     return 1;
  160. }
  161.  
  162. public OnPlayerEnterRaceCheckpoint(playerid)
  163. {
  164.     return 1;
  165. }
  166.  
  167. public OnPlayerLeaveRaceCheckpoint(playerid)
  168. {
  169.     return 1;
  170. }
  171.  
  172. public OnRconCommand(cmd[])
  173. {
  174.     return 1;
  175. }
  176.  
  177. public OnPlayerRequestSpawn(playerid)
  178. {
  179.     return 1;
  180. }
  181.  
  182. public OnObjectMoved(objectid)
  183. {
  184.     return 1;
  185. }
  186.  
  187. public OnPlayerObjectMoved(playerid, objectid)
  188. {
  189.     return 1;
  190. }
  191.  
  192. public OnPlayerPickUpPickup(playerid, pickupid)
  193. {
  194.     return 1;
  195. }
  196.  
  197. public OnVehicleMod(playerid, vehicleid, componentid)
  198. {
  199.     return 1;
  200. }
  201.  
  202. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  203. {
  204.     return 1;
  205. }
  206.  
  207. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  208. {
  209.     return 1;
  210. }
  211.  
  212. public OnPlayerSelectedMenuRow(playerid, row)
  213. {
  214.     return 1;
  215. }
  216.  
  217. public OnPlayerExitedMenu(playerid)
  218. {
  219.     return 1;
  220. }
  221.  
  222. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  223. {
  224.     return 1;
  225. }
  226.  
  227. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  228. {
  229.     return 1;
  230. }
  231.  
  232. public OnRconLoginAttempt(ip[], password[], success)
  233. {
  234.     return 1;
  235. }
  236.  
  237. public OnPlayerUpdate(playerid)
  238. {
  239.     return 1;
  240. }
  241.  
  242. public OnPlayerStreamIn(playerid, forplayerid)
  243. {
  244.     return 1;
  245. }
  246.  
  247. public OnPlayerStreamOut(playerid, forplayerid)
  248. {
  249.     return 1;
  250. }
  251.  
  252. public OnVehicleStreamIn(vehicleid, forplayerid)
  253. {
  254.     return 1;
  255. }
  256.  
  257. public OnVehicleStreamOut(vehicleid, forplayerid)
  258. {
  259.     return 1;
  260. }
  261.  
  262. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  263. {
  264.     return 1;
  265. }
  266.  
  267. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  268. {
  269.     return 1;
  270. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement