Advertisement
Guest User

0.3.7 new.pwn kickstart

a guest
May 2nd, 2015
1,164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 8.97 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.     #undef MAX_PLAYERS
  7.     #define MAX_PLAYERS     30      //Server slots
  8.     //About pools introduced in 0.3.7
  9.     //They are for perfect for loops (foreach vorks in similar way)
  10.     //but we still need MAX_PLAYERS to allocate memory.
  11.  
  12. //#include <sscanf2>//http://forum.sa-mp.com/showthread.php?t=570927   Emmet_ has took over support for these plugin (Thank you)
  13. //#include <streamer>//http://forum.sa-mp.com/showthread.php?t=102865
  14. #include <zcmd>//I dont use groups,language or anything like that in YSI so i dont need YCMD
  15. #include <YSI\y_iterate>//Foreach
  16. #include <YSI\y_va>//You know that handy optional parameters as format in SendClientMessage? These is it!
  17. //#include <YSI\y_hooks>//Uncomment if you are gonna use hooks
  18. //Handy thing, just like ZMD for commands, these is for dialogs. Didnt test with 0.3.7 but checked code and it should work fine
  19. //#include <easyDialog>//http://forum.sa-mp.com/showthread.php?t=475838&page=7
  20.  
  21. AntiDeAMX()
  22. {
  23.     new a[][] =
  24.     {
  25.         "Unarmed (Fist)",
  26.         "Brass K"
  27.     };
  28.     #pragma unused a
  29. }
  30.  
  31.  
  32. #if defined FILTERSCRIPT
  33.  
  34. public OnFilterScriptInit()
  35. {
  36.     AntiDeAMX();
  37.     print("\n--------------------------------------");
  38.     print(" Blank Filterscript by your name here");
  39.     print("--------------------------------------\n");
  40.     return 1;
  41. }
  42.  
  43. public OnFilterScriptExit()
  44. {
  45.     return 1;
  46. }
  47.  
  48. #else
  49.  
  50. main()
  51. {
  52.     print("\n----------------------------------");
  53.     print(" Blank Gamemode by your name here");
  54.     print("----------------------------------\n");
  55. }
  56.  
  57. #endif
  58.  
  59. public OnGameModeInit()
  60. {
  61.     AntiDeAMX();
  62.  
  63.     // Don't use these lines if it's a filterscript
  64.     SetGameModeText("Blank Script");
  65.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  66.     return 1;
  67. }
  68.  
  69. public OnGameModeExit()
  70. {
  71.     return 1;
  72. }
  73.  
  74. public OnIncomingConnection(playerid, ip_address[], port)
  75. {
  76.     return 1;
  77. }
  78.  
  79. public OnPlayerConnect(playerid)
  80. {
  81.     return 1;
  82. }
  83.  
  84. public OnPlayerDisconnect(playerid, reason)
  85. {
  86.     return 1;
  87. }
  88.  
  89. public OnPlayerRequestClass(playerid, classid)
  90. {
  91.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  92.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  93.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  94.     return 1;
  95. }
  96.  
  97. public OnPlayerRequestSpawn(playerid)
  98. {
  99.     return 1;
  100. }
  101.  
  102. public OnPlayerSpawn(playerid)
  103. {
  104.     return 1;
  105. }
  106.  
  107. public OnPlayerDeath(playerid, killerid, reason)
  108. {
  109.     return 1;
  110. }
  111.  
  112. public OnPlayerUpdate(playerid)
  113. {
  114.     return 1;
  115. }
  116.  
  117. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  118. {
  119.     return 1;
  120. }
  121.  
  122. public OnPlayerStateChange(playerid, newstate, oldstate)
  123. {
  124.     return 1;
  125. }
  126.  
  127. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  128. {
  129.     //if(newkeys == KEY_FIRE)  --->>> Wrong!
  130.     //if(newkeys & KEY_FIRE)    --->>> Right...
  131.     return 1;
  132. }
  133.  
  134. public OnRconLoginAttempt(ip[], password[], success)
  135. {
  136.     return 1;
  137. }
  138.  
  139. //Only works in filterscripts but not in a gamemode...
  140. public OnRconCommand(cmd[])
  141. {
  142.     return 1;
  143. }
  144.  
  145. public OnPlayerText(playerid, text[])
  146. {
  147.     return 1;
  148. }
  149.  
  150. //In case you are using ZCMD/YCMD (Or anything like them) these is not called
  151. public OnPlayerCommandText(playerid, cmdtext[])
  152. {
  153.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  154.     {
  155.         // Do something here
  156.         return 1;
  157.     }
  158.     return 0;
  159. }
  160.  
  161. //==============================================================================
  162. //--->>> ZCMD/YCMD (Uncomment if you use it)
  163. //==============================================================================
  164. /*
  165. public OnPlayerCommandReceived(playerid, cmdtext[])
  166. {
  167.     return 1;
  168. }
  169.  
  170. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  171. {
  172.     return 1;
  173. }
  174. */
  175. //==============================================================================
  176. public OnPlayerStreamIn(playerid, forplayerid)
  177. {
  178.     return 1;
  179. }
  180.  
  181. public OnPlayerStreamOut(playerid, forplayerid)
  182. {
  183.     return 1;
  184. }
  185.  
  186. public OnActorStreamIn(actorid, forplayerid)
  187. {
  188.     return 1;
  189. }
  190.  
  191. public OnActorStreamOut(actorid, forplayerid)
  192. {
  193.     return 1;
  194. }
  195.  
  196. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  197. {
  198.     return 1;
  199. }
  200.  
  201. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  202. {
  203.     return 1;
  204. }
  205.  
  206. public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  207. {
  208.     return 1;
  209. }
  210.  
  211. public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart)
  212. {
  213.     return 1;
  214. }
  215. //==============================================================================
  216. //--->>> Object,picup,checkpoint (Dont use with streamer)
  217. //==============================================================================
  218. public OnObjectMoved(objectid)
  219. {
  220.     return 1;
  221. }
  222.  
  223. public OnPlayerObjectMoved(playerid, objectid)
  224. {
  225.     return 1;
  226. }
  227.  
  228. public OnPlayerEditObject( playerid, playerobject, objectid, response,
  229. Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ )
  230. {
  231.     return 1;
  232. }
  233.  
  234. public OnPlayerEditAttachedObject( playerid, response, index, modelid, boneid,
  235. Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,
  236. Float:fRotX, Float:fRotY, Float:fRotZ,
  237. Float:fScaleX, Float:fScaleY, Float:fScaleZ )
  238. {
  239.     return 1;
  240. }
  241.  
  242. public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
  243. {
  244.     return 1;
  245. }
  246. //==============================================================================
  247. public OnPlayerPickUpPickup(playerid, pickupid)
  248. {
  249.     return 1;
  250. }
  251. //==============================================================================
  252. public OnPlayerEnterCheckpoint(playerid)
  253. {
  254.     return 1;
  255. }
  256.  
  257. public OnPlayerLeaveCheckpoint(playerid)
  258. {
  259.     return 1;
  260. }
  261.  
  262. public OnPlayerEnterRaceCheckpoint(playerid)
  263. {
  264.     return 1;
  265. }
  266.  
  267. public OnPlayerLeaveRaceCheckpoint(playerid)
  268. {
  269.     return 1;
  270. }
  271. //==============================================================================
  272. //--->>> Vehicles...
  273. //==============================================================================
  274. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  275. {
  276.     return 1;
  277. }
  278.  
  279. public OnPlayerExitVehicle(playerid, vehicleid)
  280. {
  281.     return 1;
  282. }
  283.  
  284. public OnVehicleSpawn(vehicleid)
  285. {
  286.     return 1;
  287. }
  288.  
  289. public OnVehicleDeath(vehicleid, killerid)
  290. {
  291.     return 1;
  292. }
  293.  
  294. public OnEnterExitModShop(playerid, enterexit, interiorid)
  295. {
  296.     return 1;
  297. }
  298.  
  299. public OnVehicleMod(playerid, vehicleid, componentid)
  300. {
  301.     return 1;
  302. }
  303.  
  304. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  305. {
  306.     return 1;
  307. }
  308.  
  309. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  310. {
  311.     return 1;
  312. }
  313.  
  314. public OnVehicleDamageStatusUpdate(vehicleid, playerid)
  315. {
  316.     return 1;
  317. }
  318.  
  319. public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
  320. {
  321.     return 1;
  322. }
  323.  
  324. public OnVehicleStreamIn(vehicleid, forplayerid)
  325. {
  326.     return 1;
  327. }
  328.  
  329. public OnVehicleStreamOut(vehicleid, forplayerid)
  330. {
  331.     return 1;
  332. }
  333. //==============================================================================
  334. //--->>> Menu
  335. //==============================================================================
  336. public OnPlayerSelectedMenuRow(playerid, row)
  337. {
  338.     return 1;
  339. }
  340.  
  341. public OnPlayerExitedMenu(playerid)
  342. {
  343.     return 1;
  344. }
  345.  
  346. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  347. {
  348.     return 0;
  349. }
  350.  
  351. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  352. {
  353.     return 1;
  354. }
  355.  
  356. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  357. {
  358.     return 1;
  359. }
  360.  
  361. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  362. {
  363.     return 0;
  364. }
  365.  
  366. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  367. {
  368.     return 0;
  369. }
  370.  
  371. //==============================================================================
  372. //--->>> Streamer plugin
  373. //==============================================================================
  374. //Streamer include is not like others, but we still can use its defines :P
  375. #if defined STREAMER_TYPE_OBJECT
  376. public OnDynamicObjectMoved(objectid)
  377. {
  378.     return 1;
  379. }
  380.  
  381. public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
  382. {
  383.     return 1;
  384. }
  385.  
  386. public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
  387. {
  388.     return 1;
  389. }
  390.  
  391. public OnPlayerShootDynamicObject(playerid, weaponid, objectid, Float:x, Float:y, Float:z)
  392. {
  393.     return 1;
  394. }
  395.  
  396. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  397. {
  398.     return 1;
  399. }
  400.  
  401. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  402. {
  403.     return 1;
  404. }
  405.  
  406. public OnPlayerLeaveDynamicCP(playerid, checkpointid)
  407. {
  408.     return 1;
  409. }
  410.  
  411. public OnPlayerEnterDynamicRaceCP(playerid, checkpointid)
  412. {
  413.     return 1;
  414. }
  415.  
  416. public OnPlayerLeaveDynamicRaceCP(playerid, checkpointid)
  417. {
  418.     return 1;
  419. }
  420.  
  421. public OnPlayerEnterDynamicArea(playerid, areaid)
  422. {
  423.     return 1;
  424. }
  425.  
  426. public OnPlayerLeaveDynamicArea(playerid, areaid)
  427. {
  428.     return 1;
  429. }
  430.  
  431. //Enabled with native Streamer_ToggleErrorCallback(toggle);
  432. public Streamer_OnPluginError(error[])
  433. {
  434.     return 1;
  435. }
  436. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement