[Ajuda] O que hб de errado?
#1

Bom, recentemente eu fiz uma бrea de D.M no meu servidor, e gostaria que apenas nessa бrea ao atirar em um jogador fosse retornado um "bip"...

O cуdigo й esse abaixo:
Код:
public OnPlayerTakeDamage(playerid,issuerid,Float:amount,weaponid)
{
    if(IsPlayerInPlace(playerid,2016.010986, -1161.922363, 2324.010986, -923.518310)){
    PlayerPlaySound(issuerid,17802);
    return 1;
	}
}
Porйm apуs eu adicionar isso, e os jogadores trocarem tiros, o servidor desliga sozinho... O que hб de errado?

Server-Log:
Код:
[06:29:51] [kill] GuiLopez_ killed Guilherme Sawn-off Shotgun
[06:29:51] [debug] Run time error 6: "Invalid instruction"
[06:29:51] [debug]  Unknown opcode 0x0 at address 0x0000FFFF
[06:29:51] [debug] AMX backtrace:
[06:29:51] [debug] Server crashed while executing gamemode.amx
[06:29:51] [debug] AMX backtrace:
[06:29:51] [debug] Server crashed while executing gamemode.amx
[06:29:51] [debug] AMX backtrace:
Reply
#2

Que versгo vocк usa?
Reply
#3

Tente desta forma:
PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid) {
    if(
IsPlayerInPlace(playerid2016.010986, -1161.9223632324.010986, -923.518310)) {
        
PlayerPlaySound(issuerid17802);
    }
    return 
1;

Reply
#4

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Tente desta forma:
PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid) {
    if(
IsPlayerInPlace(playerid2016.010986, -1161.9223632324.010986, -923.518310)) {
        
PlayerPlaySound(issuerid17802);
    }
    return 
1;

Continua desligando!
Reply
#5

Faзa a substituiзгo para essa:
PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart) { 
    if(
IsPlayerInPlace(playerid2016.010986, -1161.9223632324.010986, -923.518310)) { 
        
PlayerPlaySound(issuerid178020.00.00.0); 
    } 
    return 
1

Reply
#6

falta um parametro

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)