Szerző Téma: [0.3d R2] Realistic weapon bullet damage  (Megtekintve 2225 alkalommal)

[0.3d R2] Realistic weapon bullet damage
« Dátum: 2011. szeptember 20. - 20:43:00 »
0 Show voters
Sziasztok keresgettem a Hív. forumon és találtam egy nemtudom hogy mit :D ez a cucc 0.3d R2 höz van
Készítõ [WSF]ThA_Devil
ELink: http://forum.sa-mp.com/showthread.php?t=284760
Script
[pawn]
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define MaxHealth 100
//damage multipliers
#define Unarmed 7
#define brass 5
#define golf 4
#define knife 2
#define katana 1 // for instant kill
#define dildo 6
#define flowers 10
#define grenades 1 // instant from grenades
#define colt 3
#define silenced 2.5
#define deagle 2
#define shotgun 2
#define sawn 2.5
#define combat 3
#define SMG 4
#define MP5 3.5
#define AK47 3
#define M4 3.2
#define TEC9 4
#define rife 1 // rifles instant kill ( country and sniper)
#define launchers 1 // rocket launchers instant kill
#define minigun 1
#define spraycan 11 // small damage with spraycan
public OnFilterScriptInit()
{
    print(\"\\n---------------------------------------\");
    print(\" Realistic weapon damage by Th4_Evil     \");
    print(\"---------------------------------------\\n\");
    return 1;
}
public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:pDamage;
    new Float:health;
    new Float:healthamount;
    GetPlayerHealth(playerid,health);
    healthamount = health + amount;
    if(issuerid != INVALID_PLAYER_ID)
    {
    if(weaponid == 0)
    {
    pDamage = MaxHealth / Unarmed;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 1)
    {
    pDamage = MaxHealth / brass;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 2 || weaponid == 3 || weaponid == 5 || weaponid == 6 || weaponid == 7 || weaponid == 15)
    {
    pDamage = MaxHealth / golf;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 4)
    {
    pDamage = MaxHealth / knife;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 8 || weaponid == 9)
    {
    pDamage = MaxHealth / katana;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 10 || weaponid == 11 || weaponid == 12 || weaponid == 13)
    {
    pDamage = MaxHealth / dildo;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 14)
    {
    pDamage = MaxHealth / flowers;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 16)
    {
    pDamage = MaxHealth / grenades;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 22)
    {
    pDamage = MaxHealth / colt;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 23)
    {
    pDamage = MaxHealth / silenced;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 24)
    {
    pDamage = MaxHealth / deagle;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 25)
    {
    pDamage = MaxHealth / shotgun;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 26)
    {
    pDamage = MaxHealth / sawn;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 27)
    {
    pDamage = MaxHealth / combat;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 28)
    {
    pDamage = MaxHealth / SMG;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 29)
    {
    pDamage = MaxHealth / MP5;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 30)
    {
    pDamage = MaxHealth / AK47;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 31)
    {
    pDamage = MaxHealth / M4;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 32)
    {
    pDamage = MaxHealth / TEC9;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 33 || weaponid == 34)
    {
    pDamage = MaxHealth / rifle;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 35 || weaponid 36)
    {
    pDamage = MaxHealth / launchers;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 38)
    {
    pDamage = MaxHealth / minigun;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    if(weaponid == 41)
    {
    pDamage = MaxHealth / minigun;
    SetPlayerHealth(playerid, healthamount - pDamage);
    }
    }
    return 1;
}[/pawn]
Remélem hogy valakinek kell de hogy ez mi arról fogalmam nincs :S
« Utoljára szerkesztve: 2011. november 12. - 18:13:55 írta APC »

[0.3d R2] Realistic weapon bullet damage
« Válasz #1 Dátum: 2011. szeptember 20. - 21:24:05 »
0 Show voters
Megpróbálja szabályozni fegyver típus szerint hogy mennyi életet vegyen le a játékosnak, csak nem vette figyelembe hogy a játékosnak páncélja is lehet.

[0.3d R2] Realistic weapon bullet damage
« Válasz #2 Dátum: 2011. szeptember 21. - 12:29:51 »
0 Show voters
Értem nos nem zárom le hátha valakinek szüksége van rá !

[0.3d R2] Realistic weapon bullet damage
« Válasz #3 Dátum: 2011. szeptember 21. - 13:53:49 »
0 Show voters
Csak magyarositol?

[0.3d R2] Realistic weapon bullet damage
« Válasz #4 Dátum: 2011. szeptember 21. - 14:02:19 »
0 Show voters
Ne OFF olj na.

Nem elérhető Jocos

[0.3d R2] Realistic weapon bullet damage
« Válasz #5 Dátum: 2011. szeptember 21. - 23:26:02 »
0 Show voters
Kösz pont ilyet kerestem! ;D ;D ;D ;D Majd átírom a dolgokat mert ha van valakinek armor ez tényleg gyér sebzés... :) :) :)

[0.3d R2] Realistic weapon bullet damage
« Válasz #6 Dátum: 2011. szeptember 22. - 06:02:48 »
0 Show voters
Nem így kéne?
 
if(weaponid == 0) {
//Funkciók
} else if(weaponid == 1) {
//funkciók
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal