OnPlayerWeaponShot Error...
#1

+rep for help


this are the errors i am getting :

Код:
C:\Documents and Settings\Admin\Desktop\gamemodes\usf.pwn(3048) : warning 235: public function lacks forward declaration (symbol "OnPlayerWeaponShot")
C:\Documents and Settings\Admin\Desktop\gamemodes\usf.pwn(3054) : error 017: undefined symbol "GetPlayerLastShotVectors"
C:\Documents and Settings\Admin\Desktop\gamemodes\usf.pwn(3053) : warning 203: symbol is never used: "fOriginZ"
C:\Documents and Settings\Admin\Desktop\gamemodes\usf.pwn(3053) : warning 203: symbol is never used: "fOriginY"
C:\Documents and Settings\Admin\Desktop\gamemodes\usf.pwn(3053) : warning 203: symbol is never used: "fOriginX"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
with the code:

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if(!IsPlayerConnected(playerid)) return 0;
    if(weaponid == 33)
    {
    new Float:fOriginX, Float:fOriginY, Float:fOriginZ, Float:fHitPosX, Float:fHitPosY, Float:fHitPosZ;
    GetPlayerLastShotVectors(playerid, fOriginX, fOriginY, fOriginZ, fHitPosX, fHitPosY, fHitPosZ);
    CreateExplosion(fHitPosX, fHitPosY, fHitPosZ, 12, 1);
    }
    return 1;
}

please help me

thanks in advance
Reply
#2

PHP код:
forward OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ);
public 
OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(!
IsPlayerConnected(playerid)) return 0;
    if(
weaponid == 33)
    {
    new 
Float:bOriginXFloat:bOriginYFloat:bOriginZFloat:bHitPosXFloat:bHitPosYFloat:bHitPosZ;
    
GetPlayerLastShotVectors(playerid,  Float:bOriginXFloat:bOriginYFloat:bOriginZFloat:bHitPosXFloat:bHitPosYFloat:bHitPosZ);
    
CreateExplosion(fHitPosXfHitPosYfHitPosZ121);
    }
    return 
1;

Reply
#3

No McBan... it doesn't work like that...

'OnPlayerWeaponShot' and 'GetPlayerLastShotVectors' were both added in SA-MP 0.3z, this just means that you have an outdated/old a_samp include. You can download the latest SA-MP package at http://www.sa-mp.com/download
Reply
#4

Quote:
Originally Posted by Threshold
Посмотреть сообщение
No McBan... it doesn't work like that...

'OnPlayerWeaponShot' and 'GetPlayerLastShotVectors' were both added in SA-MP 0.3z, this just means that you have an outdated/old a_samp include. You can download the latest SA-MP package at http://www.sa-mp.com/download
thank you

+repped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)