SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 13/06/2017, 11:31 AM   #1
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default OnPlayerPrepareDeath using weapon-config

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 
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 13/06/2017, 11:51 AM   #2
NewFreeroamStunt
Banned
 
Join Date: May 2017
Location: Indonesia
Posts: 58
Reputation: 2
Default Re: OnPlayerPrepareDeath using weapon-config

show your code on weapon-config.inc line 4836 script WC_OnPlayerPrepareDeath
NewFreeroamStunt is offline   Reply With Quote
Old 13/06/2017, 11:53 AM   #3
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default Re: OnPlayerPrepareDeath using weapon-config

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

__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 13/06/2017, 12:16 PM   #4
renatog
Huge Clucker
 
Join Date: Mar 2016
Posts: 327
Reputation: 48
Default Re: OnPlayerPrepareDeath using weapon-config

Weird, did you made any changes to the include? Try to compile with zeex's compiler.
https://github.com/Zeex/pawn
renatog is offline   Reply With Quote
Old 13/06/2017, 12:37 PM   #5
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default Re: OnPlayerPrepareDeath using weapon-config

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.
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 13/06/2017, 01:39 PM   #6
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default Re: OnPlayerPrepareDeath using weapon-config

Any ideas?
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 13/06/2017, 01:41 PM   #7
Whatname
Big Clucker
 
Join Date: Aug 2016
Posts: 177
Reputation: 12
Default Re: OnPlayerPrepareDeath using weapon-config

did you change anything in the include?
Whatname is offline   Reply With Quote
Old 13/06/2017, 01:44 PM   #8
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default Re: OnPlayerPrepareDeath using weapon-config

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.
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 13/06/2017, 03:22 PM   #9
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default Re: OnPlayerPrepareDeath using weapon-config

Bump
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 13/06/2017, 03:34 PM   #10
Whatname
Big Clucker
 
Join Date: Aug 2016
Posts: 177
Reputation: 12
Default Re: OnPlayerPrepareDeath using weapon-config

try to reinstall
Whatname is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preventing damage through weapon config aoky Scripting Help 1 13/06/2017 06:21 AM
weapon-config unable to work aoky Scripting Help 4 12/06/2017 07:55 PM
weapon-config errors aoky Scripting Help 1 10/06/2017 03:28 AM
weapon-config.inc crukk11 Scripting Help 24 20/05/2017 02:51 PM
Vehicle Damage [weapon-config.inc] Freedom. Scripting Help 5 15/06/2016 01:55 PM


All times are GMT. The time now is 10:02 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.