13.10.2011, 19:48
Hey guys.
I have a problem. But im not sure whether the SAMP structure allows me to solve this problem:
I want to have a callback in my plugin that is called anytime the server changes a player's health using SetPlayerHealth();
OK. How can I archieve that?
__________________________________________________ _____________________________________________
1st idea:
I register a callback in my DLL and name it "SetPlayerHealth":
That does not work: The SAMP Server functions (SetPlayerHealth,...) have a higher priority.
Well can anyone please help me?
Thank you.
I have a problem. But im not sure whether the SAMP structure allows me to solve this problem:
I want to have a callback in my plugin that is called anytime the server changes a player's health using SetPlayerHealth();
Код:
// Short problem demonstration // native plugin_SetPlayerHealth(..); is defined public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger) { SetPlayerHealt(playerid,50.0f); plugin_SetPlayerHealth(...); // that sucks. I want to recognize it automaticly! :) return 1; }
__________________________________________________ _____________________________________________
1st idea:
I register a callback in my DLL and name it "SetPlayerHealth":
Код:
AMX_NATIVE_INFO HelloWorldNatives[ ] = { { "SetPlayerHealth", PlayerHealthSet}, { 0, 0} }; static long AMX_NATIVE_CALL PlayerHealthSet( AMX* amx, cell* params ) { // Do something here return 1; }
Well can anyone please help me?
Thank you.