Advertisement
Guest User

Cold_PM

a guest
Dec 7th, 2011
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.27 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf2>
  3. #include <zcmd>
  4.  
  5. #define PM_SENT_COLOR 0xFFFF00AA
  6. #define PM_RECIEVED_COLOR 0x33CCFFAA
  7. #define COLOR_ERROR 0xAFAFAFAA
  8.  
  9. #define Dialog:PMDialog 1337
  10. #define PMSendingDialog 1338
  11. #define PMRecievedDialog 1339
  12.  
  13. new id;
  14.  
  15. #define FILTERSCRIPT
  16.  
  17. #if defined FILTERSCRIPT
  18.  
  19. public OnFilterScriptInit()
  20. {
  21.     print("         |/|   ");
  22.     print("         |/|   ");
  23.     print("         |/|   ");
  24.     print("         |/|   ");
  25.     print("         |/|   ");
  26.     print("         |/| /¯)   ");
  27.     print("         |/|/|/   ");
  28.     print("         |/||/   ");
  29.     print("        (¯¯¯)   ");
  30.     print("        (¯¯¯)   ");
  31.     print("        (¯¯¯)   ");
  32.     print("        (¯¯¯)   ");
  33.     print("        (¯¯¯)   ");
  34.     print("        /¯¯/|   ");
  35.     print("       / ,^./|   ");
  36.     print("      / /   |/|   ");
  37.     print("     / /     |/|   ");
  38.     print("    ( (       )/)   ");
  39.     print("    | |       |/|   ");
  40.     print("    | |       |/|   ");
  41.     print("    | |       |/|   ");
  42.     print("    ( (       )/)   ");
  43.     print("     | |     / /   ");
  44.     print("      | `---' /   ");
  45.     print("       `-----'    ");
  46.     print("PM System by Max_Coldheart");
  47.     return 1;
  48. }
  49.  
  50. public OnFilterScriptExit()
  51. {
  52.     return 1;
  53. }
  54.  
  55. #else
  56.  
  57. main()
  58. {
  59.     return 1;
  60. }
  61.  
  62. #endif
  63.  
  64. public OnGameModeInit()
  65. {
  66.     // Don't use these lines if it's a filterscript
  67.    
  68.     return 1;
  69. }
  70.  
  71. public OnGameModeExit()
  72. {
  73.     return 1;
  74. }
  75.  
  76. public OnPlayerRequestClass(playerid, classid)
  77. {
  78.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  79.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  80.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  81.     return 1;
  82. }
  83.  
  84. public OnPlayerConnect(playerid)
  85. {
  86.     return 1;
  87. }
  88.  
  89. public OnPlayerDisconnect(playerid, reason)
  90. {
  91.     return 1;
  92. }
  93.  
  94. public OnPlayerSpawn(playerid)
  95. {
  96.     return 1;
  97. }
  98.  
  99. public OnPlayerDeath(playerid, killerid, reason)
  100. {
  101.     return 1;
  102. }
  103.  
  104. public OnVehicleSpawn(vehicleid)
  105. {
  106.     return 1;
  107. }
  108.  
  109. public OnVehicleDeath(vehicleid, killerid)
  110. {
  111.     return 1;
  112. }
  113.  
  114. public OnPlayerText(playerid, text[])
  115. {
  116.     return 1;
  117. }
  118.  
  119. CMD:pm(playerid, params[])
  120. {
  121.     ShowPlayerDialog(playerid, Dialog:PMDialog, DIALOG_STYLE_INPUT, "PM Dialog", "Type in the players name / ID", "Ok", "Cancel");
  122.     return 1;
  123. }  
  124.    
  125.  
  126. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  127. {
  128.     return 1;
  129. }
  130.  
  131. public OnPlayerExitVehicle(playerid, vehicleid)
  132. {
  133.     return 1;
  134. }
  135.  
  136. public OnPlayerStateChange(playerid, newstate, oldstate)
  137. {
  138.     return 1;
  139. }
  140.  
  141. public OnPlayerEnterCheckpoint(playerid)
  142. {
  143.     return 1;
  144. }
  145.  
  146. public OnPlayerLeaveCheckpoint(playerid)
  147. {
  148.     return 1;
  149. }
  150.  
  151. public OnPlayerEnterRaceCheckpoint(playerid)
  152. {
  153.     return 1;
  154. }
  155.  
  156. public OnPlayerLeaveRaceCheckpoint(playerid)
  157. {
  158.     return 1;
  159. }
  160.  
  161. public OnRconCommand(cmd[])
  162. {
  163.     return 1;
  164. }
  165.  
  166. public OnPlayerRequestSpawn(playerid)
  167. {
  168.     return 1;
  169. }
  170.  
  171. public OnObjectMoved(objectid)
  172. {
  173.     return 1;
  174. }
  175.  
  176. public OnPlayerObjectMoved(playerid, objectid)
  177. {
  178.     return 1;
  179. }
  180.  
  181. public OnPlayerPickUpPickup(playerid, pickupid)
  182. {
  183.     return 1;
  184. }
  185.  
  186. public OnVehicleMod(playerid, vehicleid, componentid)
  187. {
  188.     return 1;
  189. }
  190.  
  191. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  192. {
  193.     return 1;
  194. }
  195.  
  196. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  197. {
  198.     return 1;
  199. }
  200.  
  201. public OnPlayerSelectedMenuRow(playerid, row)
  202. {
  203.     return 1;
  204. }
  205.  
  206. public OnPlayerExitedMenu(playerid)
  207. {
  208.     return 1;
  209. }
  210.  
  211. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  212. {
  213.     return 1;
  214. }
  215.  
  216. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  217. {
  218.     return 1;
  219. }
  220.  
  221. public OnRconLoginAttempt(ip[], password[], success)
  222. {
  223.     return 1;
  224. }
  225.  
  226. public OnPlayerUpdate(playerid)
  227. {
  228.     return 1;
  229. }
  230.  
  231. public OnPlayerStreamIn(playerid, forplayerid)
  232. {
  233.     return 1;
  234. }
  235.  
  236. public OnPlayerStreamOut(playerid, forplayerid)
  237. {
  238.     return 1;
  239. }
  240.  
  241. public OnVehicleStreamIn(vehicleid, forplayerid)
  242. {
  243.     return 1;
  244. }
  245.  
  246. public OnVehicleStreamOut(vehicleid, forplayerid)
  247. {
  248.     return 1;
  249. }
  250.  
  251. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  252. {
  253.     if(dialogid == Dialog:PMDialog)
  254.     {
  255.         if(!response) return 1;
  256.         if(sscanf(inputtext, "r", id)) return ShowPlayerDialog(playerid, Dialog:PMDialog, DIALOG_STYLE_INPUT, "PM Dialog", "Type in the players name / ID", "Ok", "Cancel");
  257.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_ERROR, "ERROR: Player not online");
  258.         ShowPlayerDialog(playerid, PMSendingDialog, DIALOG_STYLE_INPUT, "PM Dialog", "Type your message here.", "Send", "Cancel");
  259.     }
  260.     else if(dialogid == PMSendingDialog)
  261.     {
  262.         new SenderName[MAX_PLAYER_NAME], RecieverName[MAX_PLAYER_NAME], string[128], text[256];
  263.         if(sscanf(inputtext, "s[256]", text)) return ShowPlayerDialog(playerid, PMSendingDialog, DIALOG_STYLE_INPUT, "PM Dialog", "Type your message here.", "Send", "Cancel");
  264.         if(strlen(inputtext) < 0) return SendClientMessage(playerid, COLOR_ERROR, "ERROR: You should type a message.");
  265.         GetPlayerName(playerid, SenderName, sizeof(SenderName));
  266.         GetPlayerName(id, RecieverName, sizeof(RecieverName));
  267.         format(string, sizeof(string), "PM From %s: %s", SenderName, text);
  268.         GameTextForPlayer(playerid, "]PM Sent]", 3000, 5);
  269.         ShowPlayerDialog(id, PMRecievedDialog, DIALOG_STYLE_MSGBOX, "PM", string, "OK", "");
  270.     }  
  271.     return 1;
  272. }
  273.  
  274. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  275. {
  276.     return 1;
  277. }
  278.  
  279.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement