OnPlayerPrepareDeath using weapon-config
#1

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 
Reply
#2

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

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

Reply
#4

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

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.
Reply
#6

Any ideas?
Reply
#7

did you change anything in the include?
Reply
#8

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.
Reply
#9

Bump
Reply
#10

try to reinstall
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)