[Include] New SA-MP callbacks!
#61



pawn Код:
CMD:testanim(playerid, params[])
{
    ApplyAnimation(playerid, "PLAYIDLES", "shldr", 4.1, 0, 0, 0, 0, 0, 1);
    return 1;
}
Honestly, I did not think about that callback to do it that way. Really good, makes life easier, isn't it? Thanks for accepting my suggestion. Callback is working for me properly.
Reply
#62

OnPlayerAntiReload gives way too many false alarms. I think you forgot about reloading by switching weapons. But great job anyways.
Reply
#63

Quote:
Originally Posted by mirou123
Посмотреть сообщение
OnPlayerAntiReload gives way too many false alarms. I think you forgot about reloading by switching weapons. But great job anyways.
Try downloading it again. I fixed a few things regarding the anti-reload detection last night, hopefully there won't be as much false alarms as there are now.
Reply
#64

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Try downloading it again. I fixed a few things regarding the anti-reload detection last night, hopefully there won't be as much false alarms as there are now.
Okay thanks I will check it out.
Reply
#65

GetPlayerSkillLevel Not needed by this Include.

pawn Код:
native GetPlayerSkillLevel(playerid, skill);
YSF Plugin (kurta999's version) have this and works using the Game's API!
Reply
#66

Goooood !
Reply
#67

Good job.
Reply
#68

very good
Reply
#69

Good job, very useful.
Reply
#70

When-ever I try to compile my game-mode I get a weird error,

undefined symbol "GetCallBackFlag"... I've tried searching... But I couldn't find anything.
Reply
#71

You have to show us the code where the error occurs. Also, you made an entire topic devoted to said error. Wait for people to respond to that! This error doesn't occur with me, it must be an issue with your code/coding.
Reply
#72

These are the errors;

emmetcallbacks.inc(180) : error 017: undefined symbol "GetCallbackFlag"
emmetcallbacks.inc(179) : warning 203: symbol is never used: "playerid"
Reply
#73

The errors have been fixed. Sorry I've been quite busy.
Reply
#74

Thanks, I am waiting for these especially onplayerpause
Reply
#75

Hey Emmet. Would it be possible to add;
pawn Код:
forward OnPlayerReloadWeapon(playerid, weaponid, Float:ammo);
Reply
#76

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Hey Emmet. Would it be possible to add;
pawn Код:
forward OnPlayerReloadWeapon(playerid, weaponid, Float:ammo);
Added, thanks!

I added it like this, though:

pawn Код:
forward OnPlayerReloadWeapon(playerid, weaponid, ammo);
Since ammo in SA-MP is not a float value.
Reply
#77

Another error:

emmetcallbacks.inc(742) : error 025: function heading differs from prototype
Reply
#78

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Added, thanks!

I added it like this, though:

pawn Код:
forward OnPlayerReloadWeapon(playerid, weaponid, ammo);
Since ammo in SA-MP is not a float value.
Ah, brilliant thanks!

Quote:
Originally Posted by Translator
Посмотреть сообщение
Another error:

emmetcallbacks.inc(742) : error 025: function heading differs from prototype
Here's the fix:
pawn Код:
#if defined CB_OnPlayerWeaponShot
    forward CB_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
#endif
Reply
#79

Could you add "OnPlayerDrown(playerid, Float: posX, Float: posY, Float: posZ)" please ?
Reply
#80

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
Could you add "OnPlayerDrown(playerid, Float: posX, Float: posY, Float: posZ)" please ?
afaik there's no way of detect if the player is drowning, but you can easily detect if player died of drowning.
something like this you mean?

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new
        Float:pOffset[3];
    if(reason == WEAPON_DROWN)
    {
        GetPlayerPos(playerid, pOffset[0], pOffset[1], pOffset[2]);
        CallLocalFunction("OnPlayerDrown", "ifff", playerid, pOffset[0], pOffset[1], pOffset[2]);
    }
    #if defined hook_OnPlayerDeath
        return hook_OnPlayerDeath(playerid, killerid, reason);
    #else
        return 1;
    #endif
}
#if defined _ALS_OnPlayerDeath
    #undef OnPlayerDeath
#else
    #define _ALS_OnPlayerDeath
#endif
 
#define OnPlayerDeath hook_OnPlayerDeath
#if defined hook_OnPlayerDeath
    forward hook_OnPlayerDeath(playerid, killerid, reason);
#endif

forward OnPlayerDrown(playerid, Float:X, Float:Y, Float:Z);
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)