SA-MP Forums Archive
[Include] New SA-MP callbacks! - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] New SA-MP callbacks! (/showthread.php?tid=490436)

Pages: 1 2 3 4 5 6 7 8 9


Re: New SA-MP callbacks! - Riddick94 - 16.05.2014



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.


Re : New SA-MP callbacks! - mirou123 - 17.05.2014

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


Re: Re : New SA-MP callbacks! - Emmet_ - 17.05.2014

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.


Re : Re: Re : New SA-MP callbacks! - mirou123 - 17.05.2014

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.


Re: New SA-MP callbacks! - iFarbod - 20.05.2014

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!


Re: New SA-MP callbacks! - GeekSiMo - 24.05.2014

Goooood !


Re: New SA-MP callbacks! - Kemtor - 25.05.2014

Good job.


Re: New SA-MP callbacks! - carl0o0s - 28.05.2014

very good


Re: New SA-MP callbacks! - iFiras - 28.05.2014

Good job, very useful.


Re: New SA-MP callbacks! - DamonD - 31.05.2014

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.


Re: New SA-MP callbacks! - Abagail - 31.05.2014

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.


Re: New SA-MP callbacks! - Translator - 01.06.2014

These are the errors;

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


Re: New SA-MP callbacks! - Emmet_ - 01.06.2014

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


Re: New SA-MP callbacks! - Inn0cent - 01.06.2014

Thanks, I am waiting for these especially onplayerpause


Re: New SA-MP callbacks! - Luis- - 01.06.2014

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



Re: New SA-MP callbacks! - Emmet_ - 02.06.2014

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.


Re: New SA-MP callbacks! - Translator - 02.06.2014

Another error:

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


Re: New SA-MP callbacks! - Luis- - 02.06.2014

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



Re : New SA-MP callbacks! - S4t3K - 02.06.2014

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


Re: Re : New SA-MP callbacks! - Patrick - 02.06.2014

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);