Setplayerattached Object... Please help!
#1

When i put this Code i get these errors... y is that so? Need Help with Fixin That!

Code:

PHP код:
CMD:incred(playerid, params[])
{
for ( new 
i = 0; i < 5; i ++ )
if ( 
IsPlayerAttachedObjectSlotUsed( playerid, i ) )
RemovePlayerAttachedObject( playerid, i );
SetPlayerAttachedObject( playerid, 0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); // Flame99 - handfire left
SetPlayerAttachedObject( playerid, 1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); // Flame99 - handfie right
SetPlayerAttachedObject( playerid, 2, 18703, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); // overheat_car - dust right
SetPlayerAttachedObject( playerid, 3, 18703, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); // overheat_car - dustleft
SetPlayerAttachedObject( playerid, 4, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000 ); // SkullyCap2 - skull
return 1;
} 
Errors...!

Код:
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42427) : error 017: undefined symbol "IsPlayerAttachedObjectSlotUsed"
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42428) : error 017: undefined symbol "RemovePlayerAttachedObject"
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42430) : error 017: undefined symbol "SetPlayerAttachedObject"
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42431) : error 017: undefined symbol "SetPlayerAttachedObject"
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42432) : error 017: undefined symbol "SetPlayerAttachedObject"
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42433) : error 017: undefined symbol "SetPlayerAttachedObject"
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42434) : error 017: undefined symbol "SetPlayerAttachedObject"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Please Help!

All Credits to Zhr30
Reply
#2

yes those definitions will work


#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJ ECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_ OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTAC HED_OBJECTS-1)
Reply
#3

Top of your script:

PHP код:
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9) 
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1) 
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1) 
PHP код:
CMD:incred(playerid, params[]) 
{ 
for ( new 
i = 0; i < 5; i ++ ) 
if ( 
IsPlayerAttachedObjectSlotUsed( playerid, i ) ) 
RemovePlayerAttachedObject( playerid, i ); 
}
SetPlayerAttachedObject( playerid, 0, 18693, 5); // Flame99 - handfire left 
SetPlayerAttachedObject( playerid, 1, 18693, 6); // Flame99 - handfie right 
SetPlayerAttachedObject( playerid, 2, 18703, 6); // overheat_car - dust right 
SetPlayerAttachedObject( playerid, 3, 18703, 5); // overheat_car - dustleft 
SetPlayerAttachedObject( playerid, 4, 18965, 2); // SkullyCap2 - skull 
return 1; 
} 
Reply
#4

Try update the version.
However, did you define it
pawn Код:
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
Edit: =WoR=G4M3Ov3r was faster
Reply
#5

I did it ... but i got this errors

Код:
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42432) : error 017: undefined symbol "IsPlayerAttachedObjectSlotUsed"
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42433) : error 017: undefined symbol "RemovePlayerAttachedObject"
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42435) : error 010: invalid function or declaration
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42436) : error 010: invalid function or declaration
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42437) : error 010: invalid function or declaration
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42438) : error 010: invalid function or declaration
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42439) : error 010: invalid function or declaration
E:\satdm script\test\Gamemodes\SATDM~RP13.pwn(42440) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
Here is Code i put....

PHP код:
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
CMD:incred(playerid, params[])
{
for ( new 
i = 0; i < 5; i ++ )
if ( 
IsPlayerAttachedObjectSlotUsed( playerid, i ) )
RemovePlayerAttachedObject( playerid, i );
}
SetPlayerAttachedObject( playerid, 0, 18693, 5); // Flame99 - handfire left
SetPlayerAttachedObject( playerid, 1, 18693, 6); // Flame99 - handfie right
SetPlayerAttachedObject( playerid, 2, 18703, 6); // overheat_car - dust right
SetPlayerAttachedObject( playerid, 3, 18703, 5); // overheat_car - dustleft
SetPlayerAttachedObject( playerid, 4, 18965, 2); // SkullyCap2 - skull
return 1;
} 
EDIT:NEED HELP!
Reply
#6

Need Help itz last night i posted and only 3 comments?? please i needhelp
Reply
#7

Update You SA-MP Version.
Reply
#8

wat?? to wat i should?
Reply
#9

Backup your GM ,Includes and Other Files and then Delete you Server Folder. Then Download 0.3c
http://files.sa-mp.com/samp03csvr_R5_win32.zip
Reply
#10

i am already having 3c
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)