Problem SendBulletData
#1

Hi guys, I have a question. What is failing in this code? it gives me an error...

i dont know use SendBulletData, could someone teach me to use the code??

PHP код:
new rp;
public 
OnGameModeInit()
{
    
rp CreateRNPCPolice ("Officerino"2);
    
AddRPOLWaypoint (rp2029.421354.3410.5);
    
AddRPOLWaypoint (rp2033.551286.2110.5);
    
AddRPOLWaypoint (rp2079.031286.0010.5);
    
AddRPOLWaypoint (rp2079.021362.0810.5);
return 
1;
}
public 
OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    new 
Float:nxFloat:nyFloat:nz;
    
GetPlayerPos(rpnxnynz);
    new 
Float:txFloat:tyFloat:tz;
    
GetPlayerPos(playeridtxtytz);
    
SendBulletData(rpplayeridBULLET_HIT_TYPE_PLAYER22nxnynztxtytz0.10.10.10.1);
return 
1;

PHP код:
C:\Users\1320703\Desktop\GTA3\server2\gamemodes\gamemode.pwn(54) : warning 213tag mismatch
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
1 Warning

Reply
#2

What is line 54,

Show the function SendBulletData.
Reply
#3

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
What is line 54,

Show the function SendBulletData.
Hi friend , SendBulletData is line 54...


PHP код:
SendBulletData(rpplayeridBULLET_HIT_TYPE_PLAYER22nxnynztxtytz0.10.10.10.1);  <----- line 54 
Reply
#4

the very last parameter is syncing the bullet data to which player
PHP код:
native SendBulletData(senderhitidhittypeweaponidFloat:fCenterOfHitXFloat:fCenterOfHitYFloat:fCenterOfHitZforplayerid = -1); 
you made playerid as float value... [ 0.1 ]

PHP код:
SendBulletData(rpplayeridBULLET_HIT_TYPE_PLAYER22nxnynztxtytz0.10.10.1, -1); 
Reply
#5

Quote:
Originally Posted by jlalt
Посмотреть сообщение
the very last parameter is syncing the bullet data to which player
PHP код:
native SendBulletData(senderhitidhittypeweaponidFloat:fCenterOfHitXFloat:fCenterOfHitYFloat:fCenterOfHitZforplayerid = -1); 
you made playerid as float value... [ 0.1 ]

PHP код:
SendBulletData(rpplayeridBULLET_HIT_TYPE_PLAYER22nxnynztxtytz0.10.10.1, -1); 
Thx, but still got error, what im doing wrong?

PHP код:
SendBulletData(rpplayeridBULLET_HIT_TYPE_PLAYER22nxnynztxtytz0.10.10.1, -1); 
PHP код:
C:\Users\1320703\Desktop\GTA3\server2\gamemodes\gamemode.pwn(54) : warning 213tag mismatch
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
1 Warning

Reply
#6

Quote:
Originally Posted by bookknp
Посмотреть сообщение
Hi friend , SendBulletData is line 54...


PHP код:
SendBulletData(rpplayeridBULLET_HIT_TYPE_PLAYER22nxnynztxtytz0.10.10.10.1);  <----- line 54 
lol, he wanted to show full function SendBulletData and not on what line is there (facepalm)
Reply
#7

Quote:
Originally Posted by FinStar
Посмотреть сообщение
lol, he wanted to show full function SendBulletData and not on what line is there (facepalm)
Sorry, im new and dont know do u want?? Could this be ?? (I have put all the code that I have)

PHP код:
native SendBulletData(senderidforplayerid = -1weaponidhittypehitidFloat:fHitOriginXFloat:fHitOriginYFloat:fHitOriginZFloat:fHitTargetXFloat:fHitTargetYFloat:fHitTargetZFloat:fCenterOfHitXFloat:fCenterOfHitYFloat:fCenterOfHitZ); 
Reply
#8

Okay that's good enough, you're missing the weaponid param, change ur line to this:
PHP код:
SendBulletData(rpplayeridweaponidBULLET_HIT_TYPE_PLAYERhitidnxnynztxtytz0.10.10.10.1); 
I replaced 22 with hitid cuz that made more sense u can change it back if it made a meaning to you.
Reply
#9

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
Okay that's good enough, you're missing the weaponid param, change ur line to this:
PHP код:
SendBulletData(rpplayeridweaponidBULLET_HIT_TYPE_PLAYERhitidnxnynztxtytz0.10.10.10.1); 
I replaced 22 with hitid cuz that made more sense u can change it back if it made a meaning to you.
How can I define Hitid??
Reply
#10

Quote:
Originally Posted by bookknp
Посмотреть сообщение
How can I define Hitid??
It's already defined in the callback OnPlayerWeaponShot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)