20.02.2013, 14:35
(
Последний раз редактировалось Coringa_Vilao; 07.11.2015 в 02:31.
)
Resolvido !
#include a_samp
new DanosArmas[ 45 ][ 1 ] = {
{1}, // Na mгo.
{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},
{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1},
{1},{1},{1},{1},{1},{1}
};
/*
Lembre-se que cada {} й uma arma..
Exemplo: o primeiro й igual a arma id 0, o segundo igual a arma id 1 e por ai vai..
Para saber os ids acesse https://sampwiki.blast.hk/wiki/Weapons
Nгo sei se irб funcionar.. Caso nгo der sinto muito sу tentei ajudar :C
*/
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) {
new Float:vida;
GetPlayerHealth( playerid , vida );
SetPlayerHealth( playerid , vida - DanosArmas[ weaponid ][ 0 ] );
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) {
new Float:vida, Float:colete;
GetPlayerHealth( playerid , vida );
GetPlayerArmour( playerid , colete );
if(weaponid == 0) {
if(colete >= 1) {
SetPlayerArmour( playerid , colete - 15 );
}
else
{
SetPlayerHealth( playerid , vida - 20 );
}
}
return 1;
}