Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-06-04, 09:35


awfesa







Wiek: 29
Na forum: 4705 dni
Posty: 563

Piwa: 223

Respekt: 280
Respekt: 280Respekt: 280Respekt: 280

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ć.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-04, 10:18


=X=

WUJCIO DOBRA RADA






Wiek: 52
Na forum: 4524 dni
Posty: 134
SPONSOR

Piwa: 641

Respekt: 209,5
Respekt: 209,5Respekt: 209,5

Ostrzeżeń: 100%
"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 == 0SetPlayerHealth(playeridX_ZDROWIE -5); // Pi???


Pawn

public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid)
{
    new Float:X_ZDROWIE;

    GetPlayerHealth(playeridX_ZDROWIE); // -5 ilo?? zdrowia itd.

    if(weaponid == 0SetPlayerHealth(playeridX_ZDROWIE -5); // Unarmed 

    return 1;
}


Pawn

#include <a_samp>

public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid)
{
    new Float:X_ZDROWIE;

    GetPlayerHealth(playeridX_ZDROWIE); // -5 ilo?? zdrowia itd.

    if(weaponid == 0SetPlayerHealth(playeridX_ZDROWIE -5); // Unarmed 
    if(weaponid == 1SetPlayerHealth(playeridX_ZDROWIE -9); // Brass knuckles
    if(weaponid == 2SetPlayerHealth(playeridX_ZDROWIE -12); // Golf club
    if(weaponid == 3SetPlayerHealth(playeridX_ZDROWIE -8); // Nite stick
    if(weaponid == 4SetPlayerHealth(playeridX_ZDROWIE -14); // Knife
    if(weaponid == 5SetPlayerHealth(playeridX_ZDROWIE -15); // Baseball bat
    if(weaponid == 6SetPlayerHealth(playeridX_ZDROWIE -7); // Shovel
    if(weaponid == 7SetPlayerHealth(playeridX_ZDROWIE -6); // Pool cue
    if(weaponid == 8SetPlayerHealth(playeridX_ZDROWIE -16); // Katana
    if(weaponid == 9SetPlayerHealth(playeridX_ZDROWIE -20); // Chainsaw
    if(weaponid == 10SetPlayerHealth(playeridX_ZDROWIE -4); // Purple dildo
    if(weaponid == 11SetPlayerHealth(playeridX_ZDROWIE -6); // Short vibrator
    if(weaponid == 12SetPlayerHealth(playeridX_ZDROWIE -7); // Long vibrator
    if(weaponid == 13SetPlayerHealth(playeridX_ZDROWIE -4); // White dildo
    if(weaponid == 14SetPlayerHealth(playeridX_ZDROWIE -10); // Flowers
    if(weaponid == 15SetPlayerHealth(playeridX_ZDROWIE -13); // Cane
    if(weaponid == 16SetPlayerHealth(playeridX_ZDROWIE -100); // Grenades
    if(weaponid == 17SetPlayerHealth(playeridX_ZDROWIE -50); // Tear gas
    if(weaponid == 22SetPlayerHealth(playeridX_ZDROWIE -25); // 9mm Pistol
    if(weaponid == 23SetPlayerHealth(playeridX_ZDROWIE -26); // Silenced pistol
    if(weaponid == 24SetPlayerHealth(playeridX_ZDROWIE -50); // DesertEagle
    if(weaponid == 25SetPlayerHealth(playeridX_ZDROWIE -70); // Shotgun
    if(weaponid == 26SetPlayerHealth(playeridX_ZDROWIE -35); // Sawn-off shotgun
    if(weaponid == 27SetPlayerHealth(playeridX_ZDROWIE -40); // Combat
    if(weaponid == 28SetPlayerHealth(playeridX_ZDROWIE -29); // Micro Uzi (Mac 10)
    if(weaponid == 29SetPlayerHealth(playeridX_ZDROWIE -35); // Mp5
    if(weaponid == 30SetPlayerHealth(playeridX_ZDROWIE -45); // Ak47
    if(weaponid == 31SetPlayerHealth(playeridX_ZDROWIE -48); // M4
    if(weaponid == 32SetPlayerHealth(playeridX_ZDROWIE -30); // Tec 9
    if(weaponid == 33SetPlayerHealth(playeridX_ZDROWIE -90); // Country rifle
    if(weaponid == 34SetPlayerHealth(playeridX_ZDROWIE -100); // Sniper rifle
    if(weaponid == 35SetPlayerHealth(playeridX_ZDROWIE -150); // Epg
    if(weaponid == 36SetPlayerHealth(playeridX_ZDROWIE -170); // Heat seeking rocket
    if(weaponid == 37SetPlayerHealth(playeridX_ZDROWIE -30); // Flame-thrower
    if(weaponid == 38SetPlayerHealth(playeridX_ZDROWIE -15); // Mini gun
    if(weaponid == 39SetPlayerHealth(playeridX_ZDROWIE -150); // Satchel charges
    if(weaponid == 41SetPlayerHealth(playeridX_ZDROWIE -25); // Spray can
    if(weaponid == 42SetPlayerHealth(playeridX_ZDROWIE -15); // Fire extinguisher

    return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-04, 21:23


awfesa







Wiek: 29
Na forum: 4705 dni
Posty: 563

Piwa: 223

Respekt: 280
Respekt: 280Respekt: 280Respekt: 280

A jak zrobic aby to tylko dzialalo podczas zabawy


Pawn

public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid)
{
    new Float:X_ZDROWIE;

    GetPlayerHealth(playeridX_ZDROWIE); // -5 ilo?? zdrowia itd.

    if(weaponid == 0SetPlayerHealth(playeridX_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ć.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-05, 13:39


Sillence







Wiek: 26
Na forum: 5157 dni
Posty: 1514
Nick w MP: Sillence

Piwa: 1517

Respekt: 416,3
Respekt: 416,3

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? :)

Postaw piwo autorowi tego posta
 

 
Tagi: wiecej
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [INNE] - wiecej hp Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku