SA-MP Forums Archive
OnPlayerPrepareDeath using weapon-config - 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: OnPlayerPrepareDeath using weapon-config (/showthread.php?tid=635761)



OnPlayerPrepareDeath using weapon-config - aoky - 13.06.2017

How does OnPlayerPrepareDeath work? Can anyone give an example of some sort. I am using weapon-config.

PHP Code:
public OnPlayerPrepareDeath(playeridanimlib[32], animname[32], &anim_lock, &respawn_time);
{
    return 
1;

Errors:
PHP Code:
C:\Users\Austin\Desktop\Small-County-RP-Release\pawno\include\weapon-config.inc(4836) : error 004: function "WC_OnPlayerPrepareDeath" is not implemented
C
:\Users\Austin\Desktop\skrt\gamemodes\SCRP-R39.pwn(1274) : error 055start of function body without function header
C
:\Users\Austin\Desktop\skrt\gamemodes\SCRP-R39.pwn(1275) : error 010invalid function or declaration 



Re: OnPlayerPrepareDeath using weapon-config - NewFreeroamStunt - 13.06.2017

show your code on weapon-config.inc line 4836 script WC_OnPlayerPrepareDeath


Re: OnPlayerPrepareDeath using weapon-config - aoky - 13.06.2017

PHP Code:
public OnPlayerPrepareDeath(playeridanimlib[32], animname[32], &anim_lock, &respawn_time)
{
    
#if defined WC_OnPlayerPrepareDeath
//HERE        WC_OnPlayerPrepareDeath(playerid, animlib, animname, anim_lock, respawn_time);
    #endif




Re: OnPlayerPrepareDeath using weapon-config - renatog - 13.06.2017

Weird, did you made any changes to the include? Try to compile with zeex's compiler.
https://github.com/Zeex/pawn


Re: OnPlayerPrepareDeath using weapon-config - aoky - 13.06.2017

Quote:
Originally Posted by renatog
View Post
Weird, did you made any changes to the include? Try to compile with zeex's compiler.
https://github.com/Zeex/pawn
Done, same errors.


Re: OnPlayerPrepareDeath using weapon-config - aoky - 13.06.2017

Any ideas?


Re: OnPlayerPrepareDeath using weapon-config - Whatname - 13.06.2017

did you change anything in the include?


Re: OnPlayerPrepareDeath using weapon-config - aoky - 13.06.2017

Yeah, I changed this because it was giving us warnings.

PHP Code:

stock WC_CreateVehicle
(modelidFloat:xFloat:yFloat:zFloat:anglecolor1color2respawn_delay)
{
    new 
id CreateVehicle(modelidxyzanglecolor1color2respawn_delay);
    if (
id != INVALID_VEHICLE_ID) {
        
s_VehicleAlive[id] = true;
        return 
id;
    }
    return 
INVALID_VEHICLE_ID;

To:

PHP Code:
stock WC_CreateVehicle(modelidFloat:xFloat:yFloat:zFloat:anglecolor1color2respawn_delayaddsiren 0)
{
    new 
id CreateVehicle(modelidxyzanglecolor1color2respawn_delayaddsiren);
    if (
id != INVALID_VEHICLE_ID) {
        
s_VehicleAlive[id] = true;
        return 
id;
    }
    return 
INVALID_VEHICLE_ID;

That was it.


Re: OnPlayerPrepareDeath using weapon-config - aoky - 13.06.2017

Bump


Re: OnPlayerPrepareDeath using weapon-config - Whatname - 13.06.2017

try to reinstall