SA-MP Forums Archive
Help about Thor class - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help about Thor class (/showthread.php?tid=656072)



Help about Thor class - Neom - 06.07.2018

So guys I am working on 1 gamemode and I want to create class called "Thor" so I want it's ability to go in air by pressing LALT and come down with speed so to near Enemy get damaged 50 percent health lost of enemy and 0 of Thor


Re: Help about Thor class - coool - 07.07.2018

To check if the player has pressed LALT use "OnPlayerKeyPress".. for jumping in air use "SetPlayerVelocity".. for decreasing enemy health check with "IsPlayerInRangeOfPoint" and damage the players in range.. but Thor would lose health because of jumping from height you can store its health in a variable and then give back after collision.
sorry for my bad English.