Wysłany: 2014-06-04, 09:35
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
Mo?na jako? zwiekszy? ilo?? zabieranych hp podczas ataku z pi??ci lub z innej broni?
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Wysłany: 2014-06-04, 10:18
=X=
WUJCIO DOBRA RADA
Wiek: 52 Na forum: 4524 dni Posty: 134
SPONSOR
Piwa : 641
"awfesa" napisał/a :Mo?na jako? zwiekszy? ilo?? zabieranych hp podczas ataku z pi??ci lub z innej broni?
http://wiki.sa-mp.com/wiki/OnPlayerTakeDamage
http://wiki.sa-mp.com/wiki/Weapons
Przyk?ad:
Pawn
if( weaponid == 0 ) SetPlayerHealth ( playerid , X_ZDROWIE - 5 ); // Pi???
Pawn
public OnPlayerTakeDamage ( playerid , issuerid , Float : amount , weaponid )
{
new Float : X_ZDROWIE ;
GetPlayerHealth ( playerid , X_ZDROWIE ); // -5 ilo?? zdrowia itd.
if( weaponid == 0 ) SetPlayerHealth ( playerid , X_ZDROWIE - 5 ); // Unarmed
return 1 ;
}
Pawn
#include <a_samp>
public OnPlayerTakeDamage ( playerid , issuerid , Float : amount , weaponid )
{
new Float : X_ZDROWIE ;
GetPlayerHealth ( playerid , X_ZDROWIE ); // -5 ilo?? zdrowia itd.
if( weaponid == 0 ) SetPlayerHealth ( playerid , X_ZDROWIE - 5 ); // Unarmed
if( weaponid == 1 ) SetPlayerHealth ( playerid , X_ZDROWIE - 9 ); // Brass knuckles
if( weaponid == 2 ) SetPlayerHealth ( playerid , X_ZDROWIE - 12 ); // Golf club
if( weaponid == 3 ) SetPlayerHealth ( playerid , X_ZDROWIE - 8 ); // Nite stick
if( weaponid == 4 ) SetPlayerHealth ( playerid , X_ZDROWIE - 14 ); // Knife
if( weaponid == 5 ) SetPlayerHealth ( playerid , X_ZDROWIE - 15 ); // Baseball bat
if( weaponid == 6 ) SetPlayerHealth ( playerid , X_ZDROWIE - 7 ); // Shovel
if( weaponid == 7 ) SetPlayerHealth ( playerid , X_ZDROWIE - 6 ); // Pool cue
if( weaponid == 8 ) SetPlayerHealth ( playerid , X_ZDROWIE - 16 ); // Katana
if( weaponid == 9 ) SetPlayerHealth ( playerid , X_ZDROWIE - 20 ); // Chainsaw
if( weaponid == 10 ) SetPlayerHealth ( playerid , X_ZDROWIE - 4 ); // Purple dildo
if( weaponid == 11 ) SetPlayerHealth ( playerid , X_ZDROWIE - 6 ); // Short vibrator
if( weaponid == 12 ) SetPlayerHealth ( playerid , X_ZDROWIE - 7 ); // Long vibrator
if( weaponid == 13 ) SetPlayerHealth ( playerid , X_ZDROWIE - 4 ); // White dildo
if( weaponid == 14 ) SetPlayerHealth ( playerid , X_ZDROWIE - 10 ); // Flowers
if( weaponid == 15 ) SetPlayerHealth ( playerid , X_ZDROWIE - 13 ); // Cane
if( weaponid == 16 ) SetPlayerHealth ( playerid , X_ZDROWIE - 100 ); // Grenades
if( weaponid == 17 ) SetPlayerHealth ( playerid , X_ZDROWIE - 50 ); // Tear gas
if( weaponid == 22 ) SetPlayerHealth ( playerid , X_ZDROWIE - 25 ); // 9mm Pistol
if( weaponid == 23 ) SetPlayerHealth ( playerid , X_ZDROWIE - 26 ); // Silenced pistol
if( weaponid == 24 ) SetPlayerHealth ( playerid , X_ZDROWIE - 50 ); // DesertEagle
if( weaponid == 25 ) SetPlayerHealth ( playerid , X_ZDROWIE - 70 ); // Shotgun
if( weaponid == 26 ) SetPlayerHealth ( playerid , X_ZDROWIE - 35 ); // Sawn-off shotgun
if( weaponid == 27 ) SetPlayerHealth ( playerid , X_ZDROWIE - 40 ); // Combat
if( weaponid == 28 ) SetPlayerHealth ( playerid , X_ZDROWIE - 29 ); // Micro Uzi (Mac 10)
if( weaponid == 29 ) SetPlayerHealth ( playerid , X_ZDROWIE - 35 ); // Mp5
if( weaponid == 30 ) SetPlayerHealth ( playerid , X_ZDROWIE - 45 ); // Ak47
if( weaponid == 31 ) SetPlayerHealth ( playerid , X_ZDROWIE - 48 ); // M4
if( weaponid == 32 ) SetPlayerHealth ( playerid , X_ZDROWIE - 30 ); // Tec 9
if( weaponid == 33 ) SetPlayerHealth ( playerid , X_ZDROWIE - 90 ); // Country rifle
if( weaponid == 34 ) SetPlayerHealth ( playerid , X_ZDROWIE - 100 ); // Sniper rifle
if( weaponid == 35 ) SetPlayerHealth ( playerid , X_ZDROWIE - 150 ); // Epg
if( weaponid == 36 ) SetPlayerHealth ( playerid , X_ZDROWIE - 170 ); // Heat seeking rocket
if( weaponid == 37 ) SetPlayerHealth ( playerid , X_ZDROWIE - 30 ); // Flame-thrower
if( weaponid == 38 ) SetPlayerHealth ( playerid , X_ZDROWIE - 15 ); // Mini gun
if( weaponid == 39 ) SetPlayerHealth ( playerid , X_ZDROWIE - 150 ); // Satchel charges
if( weaponid == 41 ) SetPlayerHealth ( playerid , X_ZDROWIE - 25 ); // Spray can
if( weaponid == 42 ) SetPlayerHealth ( playerid , X_ZDROWIE - 15 ); // Fire extinguisher
return 1 ;
}
Wysłany: 2014-06-04, 21:23
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
A jak zrobic aby to tylko dzialalo podczas zabawy
Pawn
public OnPlayerTakeDamage ( playerid , issuerid , Float : amount , weaponid )
{
new Float : X_ZDROWIE ;
GetPlayerHealth ( playerid , X_ZDROWIE ); // -5 ilo?? zdrowia itd.
if( weaponid == 0 ) SetPlayerHealth ( playerid , X_ZDROWIE - 5 ); // Unarmed
return 1 ;
}
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Wysłany: 2014-06-05, 13:39
Sillence
Wiek: 26 Na forum: 5157 dni Posty: 1514
Nick w MP: Sillence
Piwa : 1517
awfesa , Dodajesz w tym kodzie warunek:
Kod: if(WojnaGangow== true)
{
// Kod na zwi?kszone obra?enia
return 1;
}
Nie wiem jakie masz zabawy w gamemodzie. Poda?em tylko przyk?ad, na kt?rym mo?esz si? wzorowa?
Tagi: wiecej
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: