OnPlayerWeaponshot
#1

This is the script
Код:
public OnPlayerWeaponShot(playerid, 31, 1, hitid, 0.0, 0.0, 0.0)
{
    new szString[144];
    format(szString, sizeof(szString), "Weapon %i fired. hittype: %i   hitid: %i   pos: %f, %f, %f", 31, 1, hitid, 0.0, 0.0, 0.0);
    return 1;
}
This is the error I get, line 8 is the public...
C:\Users\Astro\Desktop\Server1\gamemodes\hi.pwn( : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

could anyone fix it for me?
Reply
#2

PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    new 
szString[144];
    
format(szStringsizeof(szString), "Weapon %i fired. hittype: %i   hitid: %i   pos: %f, %f, %f"weaponidhittypehitidfXfYfZ);
    
SendClientMessage(playerid, -1szString);
 
    return 
1;

try this.
Reply
#3

Quote:
Originally Posted by AnthonyDaBestt
Посмотреть сообщение
PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    new 
szString[144];
    
format(szStringsizeof(szString), "Weapon %i fired. hittype: %i   hitid: %i   pos: %f, %f, %f"weaponidhittypehitidfXfYfZ);
    
SendClientMessage(playerid, -1szString);
 
    return 
1;

try this.
That's the format from wiki, but when I put the weaponid, playerid, hittype I get the errors.
Reply
#4

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)

that's the correct format..

post the errors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)