Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[Include] Simple callback printer

$
0
0
There's nothing special with this include, it simply prints out (almost) every callback and its parameter. I created this to be used within debugging only, meaning I'd not suggest you to use this on a public server as the console will be spammed very quickly. The callbacks that are added is:
Quote:

  • OnActorStreamIn
  • OnActorStreamOut
  • OnDialogResponse
  • OnEnterExitModShop
  • OnFilterScriptExit
  • OnFilterScriptInit
  • OnGameModeExit
  • OnGameModeInit
  • OnIncomingConnection
  • OnObjectMoved
  • OnPlayerClickMap
  • OnPlayerClickPlayer
  • OnPlayerClickPlayerTextDraw
  • OnPlayerClickTextDraw
  • OnPlayerCommandText
  • OnPlayerConnect
  • OnPlayerDeath
  • OnPlayerDisconnect
  • OnPlayerEditAttachedObject
  • OnPlayerEditObject
  • OnPlayerEnterCheckpoint
  • OnPlayerEnterRaceCheckpoint
  • OnPlayerEnterVehicle
  • OnPlayerExitVehicle
  • OnPlayerExitedMenu
  • OnPlayerGiveDamage
  • OnPlayerGiveDamageActor
  • OnPlayerInteriorChange
  • OnPlayerKeyStateChange
  • OnPlayerLeaveCheckpoint
  • OnPlayerLeaveRaceCheckpoint
  • OnPlayerObjectMoved
  • OnPlayerPickUpPickup
  • OnPlayerRequestClass
  • OnPlayerRequestSpawn
  • OnPlayerSelectObject
  • OnPlayerSelectedMenuRow
  • OnPlayerSpawn
  • OnPlayerStateChange
  • OnPlayerStreamIn
  • OnPlayerStreamOut
  • OnPlayerTakeDamage
  • OnPlayerText
  • OnPlayerWeaponShot
  • OnRconCommand
  • OnRconLoginAttempt
  • OnVehicleDamageStatusUpdate
  • OnVehicleDeath
  • OnVehicleMod
  • OnVehiclePaintjob
  • OnVehicleRespray
  • OnVehicleSirenStateChange
  • OnVehicleSpawn
  • OnVehicleStreamIn
  • OnVehicleStreamOut

Here's a list of the callbacks that wasn't included and why not:
Quote:

OnTrailerUpdate
Completely unnecessary as it runs every each second depending on the trailer's movement and updates,
would just cause spam to the console.
OnPlayerUpdate
Same as above, would cause enormous spam.
OnUnoccupiedVehicleUpdate
Still same as above.
OnPlayerTeamPrivmsg
Callback was removed in newer versions of SAMP.
OnPlayerPrivmsg
Same as above, removed in newer versions of SAMP.

Some things you might want to keep in mind:
  • OnDialogResponse prints out the whole inputtext, this can be an unprotected password or such.
  • OnRconCommand can send its printf() to the player as a message if it was used by (/rcon)


And last: You must have y_hooks available for this to work, I did code it in ALS at first, but I fucked it up, so I had to change the whole code from ALS hooking to y_hooks.

@To people who think this is a completely unnecessary include;
It's not, it's really useful if you don't wanna bother going from callback to callback manually, checking if it's run or not etc.
(Yes, I did all of this manually, went through all wiki's etc.)



Pastebin: https://pastebin.com/MeSmDFEk

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>