Advertisement
Guest User

[v1a]Color Dialogs

a guest
Feb 13th, 2011
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.92 KB | None | 0 0
  1. #include <a_samp>
  2. #include <colors>
  3.  
  4. #define COLOR_RED 0xAA3333AA
  5. #define COLOR_SIMPSONS 0xFFD90FAA
  6. #define COLOR_GREEN 0x33AA33AA
  7.  
  8. #if defined FILTERSCRIPT
  9.  
  10. public OnFilterScriptInit()
  11. {
  12.     print("\n--------------------------------------");
  13.     print(" Color Dialog - Created By -Luis");
  14.     print("--------------------------------------\n");
  15.     return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20.     return 1;
  21. }
  22.  
  23. #endif
  24.  
  25.  
  26. public OnPlayerRequestClass(playerid, classid)
  27. {
  28.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  29.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  30.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerConnect(playerid)
  35. {
  36.     SendClientMessage(playerid, COLOR_SIMPSONS, "Color Dialog by -Luis");
  37.     return 1;
  38. }
  39.  
  40. public OnPlayerDisconnect(playerid, reason)
  41. {
  42.     return 1;
  43. }
  44.  
  45. public OnPlayerSpawn(playerid)
  46. {
  47.     return 1;
  48. }
  49.  
  50. public OnPlayerDeath(playerid, killerid, reason)
  51. {
  52.     return 1;
  53. }
  54.  
  55. public OnVehicleSpawn(vehicleid)
  56. {
  57.     return 1;
  58. }
  59.  
  60. public OnVehicleDeath(vehicleid, killerid)
  61. {
  62.     return 1;
  63. }
  64.  
  65. public OnPlayerText(playerid, text[])
  66. {
  67.     return 1;
  68. }
  69.  
  70. public OnPlayerCommandText(playerid, cmdtext[])
  71. {
  72.     if (strcmp("/misc", cmdtext, true, 10) == 0)
  73.     {
  74.         ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "{00C0FF}Luis's Fun Things!", "Colors", "Select", "Cancel");
  75.         return 1;
  76.     }
  77.     return 0;
  78. }
  79. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  80. {
  81.     return 1;
  82. }
  83.  
  84. public OnPlayerExitVehicle(playerid, vehicleid)
  85. {
  86.     return 1;
  87. }
  88.  
  89. public OnPlayerStateChange(playerid, newstate, oldstate)
  90. {
  91.     return 1;
  92. }
  93.  
  94. public OnPlayerEnterCheckpoint(playerid)
  95. {
  96.     return 1;
  97. }
  98.  
  99. public OnPlayerLeaveCheckpoint(playerid)
  100. {
  101.     return 1;
  102. }
  103.  
  104. public OnPlayerEnterRaceCheckpoint(playerid)
  105. {
  106.     return 1;
  107. }
  108.  
  109. public OnPlayerLeaveRaceCheckpoint(playerid)
  110. {
  111.     return 1;
  112. }
  113.  
  114. public OnRconCommand(cmd[])
  115. {
  116.     return 1;
  117. }
  118.  
  119. public OnPlayerRequestSpawn(playerid)
  120. {
  121.     return 1;
  122. }
  123.  
  124. public OnObjectMoved(objectid)
  125. {
  126.     return 1;
  127. }
  128.  
  129. public OnPlayerObjectMoved(playerid, objectid)
  130. {
  131.     return 1;
  132. }
  133.  
  134. public OnPlayerPickUpPickup(playerid, pickupid)
  135. {
  136.     return 1;
  137. }
  138.  
  139. public OnVehicleMod(playerid, vehicleid, componentid)
  140. {
  141.     return 1;
  142. }
  143.  
  144. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  145. {
  146.     return 1;
  147. }
  148.  
  149. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  150. {
  151.     return 1;
  152. }
  153.  
  154. public OnPlayerSelectedMenuRow(playerid, row)
  155. {
  156.     return 1;
  157. }
  158.  
  159. public OnPlayerExitedMenu(playerid)
  160. {
  161.     return 1;
  162. }
  163.  
  164. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  165. {
  166.     return 1;
  167. }
  168.  
  169. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  170. {
  171.     return 1;
  172. }
  173.  
  174. public OnRconLoginAttempt(ip[], password[], success)
  175. {
  176.     return 1;
  177. }
  178.  
  179. public OnPlayerUpdate(playerid)
  180. {
  181.     return 1;
  182. }
  183.  
  184. public OnPlayerStreamIn(playerid, forplayerid)
  185. {
  186.     return 1;
  187. }
  188.  
  189. public OnPlayerStreamOut(playerid, forplayerid)
  190. {
  191.     return 1;
  192. }
  193.  
  194. public OnVehicleStreamIn(vehicleid, forplayerid)
  195. {
  196.     return 1;
  197. }
  198.  
  199. public OnVehicleStreamOut(vehicleid, forplayerid)
  200. {
  201.     return 1;
  202. }
  203.  
  204. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  205. {
  206.     if (dialogid == 10)
  207.     {
  208.         if (response)
  209.         {
  210.             if (listitem == 0)
  211.             {
  212.                 ShowPlayerDialog(playerid, 11, DIALOG_STYLE_LIST, "{FFAF00}Colors List", "1\t{00C0FF}Light Blue\n2\t{0049FF}Blue\n3\t{FF00EA}Pink\n4\t{F81414}Dark Red\n5\t{6EF83C}Green\n6\t{FFAF00}Orange\n7\t{F3FF02}Yellow\n8\tBack", "Select", "Cancel");
  213.             }
  214.         }
  215.     }
  216.     if(dialogid == 11)
  217.     {
  218.         if(response)
  219.         {
  220.             if (listitem == 0)
  221.             {
  222.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your color is now Light Blue");
  223.                 SetPlayerColor(playerid, COLOR_LIGHTBLUE);
  224.             }
  225.             if (listitem == 1)
  226.             {
  227.                 SendClientMessage(playerid, COLOR_BLUE, "Your color is now Blue");
  228.                 SetPlayerColor(playerid, COLOR_BLUE);
  229.             }
  230.             if (listitem == 2)
  231.             {
  232.                 SendClientMessage(playerid, COLOR_PINK, "Your color is now Pink");
  233.                 SetPlayerColor(playerid, COLOR_PINK);
  234.             }
  235.             if (listitem == 3)
  236.             {
  237.                 SendClientMessage(playerid, COLOR_RED, "Your color is now Dark Red");
  238.                 SetPlayerColor(playerid, COLOR_RED);
  239.             }
  240.             if (listitem == 4)
  241.             {
  242.                 SendClientMessage(playerid, COLOR_GREEN, "Your color is now Green");
  243.                 SetPlayerColor(playerid, COLOR_GREEN);
  244.             }
  245.             if (listitem == 5)
  246.             {
  247.                 SendClientMessage(playerid, COLOR_ORANGE, "Your color is now a Orange");
  248.                 SetPlayerColor(playerid, COLOR_ORANGE);
  249.             }
  250.             if (listitem == 6)
  251.             {
  252.                 SendClientMessage(playerid, COLOR_YELLOW, "Your color is now Yellow");
  253.                 SetPlayerColor(playerid, COLOR_YELLOW);
  254.             }
  255.             if (listitem == 7)
  256.             {
  257.                 ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "{00C0FF}Luis's Fun Things!", "Colors", "Select", "Cancel");
  258.             }
  259.         }
  260.     }
  261.     return 1;
  262. }
  263.  
  264. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  265. {
  266.     return 1;
  267. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement