[Pedido] Diminuir dano das armas
#1

Queria diminuir o dano das armas do meu server, queria um fs ou alguma coisa que fizesse isso por favor alguem me ajuda
Reply
#2

Alguem me ajuda
Reply
#3

PHP код:
// SetTeamCount( 1 );        --->>   em OnGameModeInit
// SetPlayerTeam(playerid, 1);  --->> em OnPlayerConnect



public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponid)
{
    new 
Float:Health[MAX_PLAYERS], new Float:Armour[MAX_PLAYERS];

    
GetPlayerHealthplayerid Health[playerid] );
    
GetPlayerArmourplayerid Armour[playerid]);

    if( 
Armour )
    {
    if( 
weaponid == 24 )// em este caso vocк remover  20 Armour
    
{
    
SetPlayerArmourplayerid Armour[playerid] - 20 );
    }

    }
    else if(
Armour 0)
    { 
    if( 
weaponid == 24 )// em este caso vocк remover  20 Health
    
{
    
SetPlayerHealthplayerid Health[playerid] - 20 );
    }

    } 


    return 
1;
}


se vocк ajudar Add +repp ;) 
Reply
#4

Quote:
Originally Posted by cesar_******
Посмотреть сообщение
PHP код:
// SetTeamCount( 1 );        --->>   em OnGameModeInit
// SetPlayerTeam(playerid, 1);  --->> em OnPlayerConnect
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponid)
{
    new 
Float:Health[MAX_PLAYERS], new Float:Armour[MAX_PLAYERS];
    
GetPlayerHealthplayerid Health[playerid] );
    
GetPlayerArmourplayerid Armour[playerid]);
    if( 
Armour )
    {
    if( 
weaponid == 24 )// em este caso vocк remover  20 Armour
    
{
    
SetPlayerArmourplayerid Armour[playerid] - 20 );
    }
    }
    else if(
Armour 0)
    { 
    if( 
weaponid == 24 )// em este caso vocк remover  20 Health
    
{
    
SetPlayerHealthplayerid Health[playerid] - 20 );
    }
    } 
    return 
1;
}
se vocк ajudar Add +repp ;) 
Pra eu adcionar mais armas como eu faзo?
Reply
#5

Quote:
Originally Posted by Rezinho_Souza
Посмотреть сообщение
Pra eu adcionar mais armas como eu faзo?
PHP код:
if( weaponid == ArmaId)
{

PD: se vocк ajudar Add +repp
Reply
#6

Eu criei um fs com esse codigos e deu os seguintes erros:

C:\Documents and Settings\Administrador.DINAMITE\Desktop\Samp Server\Untitled.pwn(6) : warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")
C:\Documents and Settings\Administrador.DINAMITE\Desktop\Samp Server\Untitled.pwn( : error 017: undefined symbol "MAX_PLAYERS"
C:\Documents and Settings\Administrador.DINAMITE\Desktop\Samp Server\Untitled.pwn( : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador.DINAMITE\Desktop\Samp Server\Untitled.pwn( : warning 215: expression has no effect
C:\Documents and Settings\Administrador.DINAMITE\Desktop\Samp Server\Untitled.pwn( : error 001: expected token: ";", but found "new"
C:\Documents and Settings\Administrador.DINAMITE\Desktop\Samp Server\Untitled.pwn( : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#7

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponid)
{
    new 
Float:Health[MAX_PLAYERS], Float:Armour[MAX_PLAYERS];
    
GetPlayerHealthplayerid Health[playerid] );
    
GetPlayerArmourplayerid Armour[playerid]);
    if( 
Armour[playerid] > )
    {
    if( 
weaponid == 24 )// em este caso vocк remover  20 Armour
    
{
    
SetPlayerArmourplayerid Armour[playerid] - 20 );
    }
    }
    else if(
Armour[playerid] < 0)
    {
    if( 
weaponid == 24 )// em este caso vocк remover  20 Health
    
{
    
SetPlayerHealthplayerid Health[playerid] - 20 );
    }
    }
    return 
1;

EDIT : TESTE
PD: isso me dб nenhum erro
tenta assim e atualizaзхes sua includes
Reply
#8

Vou tentar atualizar minhas incluide spois continua dando o mesmo erro.

E eu nao adcionei dentro do gm eu abri um novo pwn pra por isso
Reply
#9

PHP код:
forward OnPlayerGiveDamage(playeriddamagedidFloatamountweaponid);
public 
OnPlayerGiveDamage(playeriddamagedidFloatamountweaponid

    new 
Float:Health[200], Float:Armour[200]; //--Max jogadores em seu Server

    
GetPlayerHealthplayerid Health[playerid] ); 
    
GetPlayerArmourplayerid Armour[playerid]); 

    if( 
Armour[playerid] > 
    { 
    if( 
weaponid == 24 )// em este caso vocк remover  20 Armour 
    

    
SetPlayerArmourplayerid Armour[playerid] - 20 ); 
    } 

    } 
    else if(
Armour[playerid] < 0
    { 
    if( 
weaponid == 24 )// em este caso vocк remover  20 Health 
    

    
SetPlayerHealthplayerid Health[playerid] - 20 ); 
    } 

    } 


    return 
1

Reply
#10

Atualizei tudo mesmo assim continua a dar erros ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)