Raised This Month: $ Target: $400
 0% 

Solved Orpheu Functions | Read File | Multijump | Rocket | Random Players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-11-2017 , 08:51   Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #1

1. How do you hook functions in Orpheu like RegisterHam in Hamsandwich and what functions are available

2. How can I read from an .ini file data like SteamID , setinfo _pw , flags

3. What's the best way to create multijump ?

4. How to create a rocket (bazooka) ?

5. How can I choose random players from a team , example :

Choose *random num between 1-5* players from CT team ?

Thnx.
__________________

Last edited by edon1337; 03-01-2017 at 08:41.
edon1337 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-11-2017 , 09:04   Re: Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #2

1. OrpheuRegisterHook(). There's multiple tutorials on how Orpheu works and what you can do with it. Pretty much any function from the game is available, but it's not as easy as typing "Ham_Spawn", there's more steps to it. It's a module that is really advanced and requires some knowledge of reverse-engineering and if you are beginner in coding (and it seems like you are), I would advise you to stay away from it for at least some time until you learn more.

As for the rest, you can find all of these in either tutorials or released plugins around the forum, there's so many examples; 2) File reading tutorials; 3) Multiple plugins and snippets with it around; 4) Plugins around here as well as HLSDK; 5) Multiple snippets around I am sure.

Last edited by klippy; 02-11-2017 at 09:06.
klippy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-11-2017 , 09:27   Re: Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #3

1. What Klippy said, but I would not say to avoid it completly. To be able to use a function, you need a way to identify it(so a signature file). My advice is to search in the forums for the functions you need(there are good chances someone did the signature already), at least until you learn how to find them by yourself. Once the signature file is available, you can hook it without problem.

2. First things first: always use the new file system. Open the file with fopen and save it's pointer. Use fgets to read a line(in a while loop). Then, use parse to break the line into it's components(steamid, password, flags). There is a tutorial about that, search.

3.https://forums.alliedmods.net/showpo...5&postcount=96
__________________
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-11-2017 , 11:15   Re: Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #4

It's sad how there's no proper tutorial for Orpheu, nor any useful threads.

@hamlet

2. Erm I already had an explanation by someone already I just need an example.

3. Why is he checking pev(id, pev_waterlevel) >= 2 ?
__________________
edon1337 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 02-11-2017 , 11:25   Re: Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #5

2.Search
5.Search
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-11-2017 , 12:07   Re: Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #6

Current tutorials are good enough. Orpheu itself does not need any tutorials. Just use it's natives as you use other modules. The tutorial that you need is for finding functions in game dll and how to make the signature.
You could tells us what exactly you don't understand, maybe we can explain it better.

2.I told you what to do line by line...
PHP Code:
FilePointer fopen("some_file_path""rt")
if(
FilePointer)
{
    while(!
feof(FilePointer))
    {
        
fgets(FilePointerFileDatacharsmax(FileData))
        
parse(FileDataSteamIDcharsmax(SteamID), Passwordcharsmax(Password), Flagscharsmax(Flags))
    }
    
    
fclose(FilePointer)

About waterlevel: he checks to see if player is not under water.
__________________

Last edited by HamletEagle; 02-11-2017 at 12:21.
HamletEagle is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-11-2017 , 13:30   Re: Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #7

Quote:
Originally Posted by edon1337 View Post
It's sad how there's no proper tutorial for Orpheu, nor any useful threads.
There are proper and extensive tutorials and there are also threads with data for Orpheu, like signatures and offsets. The Orpheu API is very well designed and easy to use, you maybe just don't understand what exactly Orpheu's job is or what signatures and offsets are. I warned you it's a really advanced topic, so you'll have to do some learning before you use it.

Also, as Hamlet said, if you need help on anything specific tell us and we may be able to help you understand.
klippy is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-11-2017 , 14:16   Re: Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #8

3.
PHP Code:
/*
To do:

T = needs testing
X = done
- = cancelled

[T] CZ bots support
v0.1.2
[ ] 
*/

// Modules
#include <amxmodx>
#include <engine>
#include <hamsandwich>

// Plug-in APIs
#include <cs_ham_bots_api>
#include <zombieplaguenightmare>

new g_pCvarJumpsMaxg_pCvarJumpsMaxResetBitsumg_pCvarJumpsVelocityg_iItemIDg_bEscapeMapg_iJumps[33], g_iJumpsMax[33];

public 
plugin_init()
{
    
register_plugin("[ZPNM] Item: MultiJump""0.1.2""twistedeuphoria, Dabbi, B!gBud, D i 5 7 i n c T")
    
    
register_event("HLTV""fw_EventRoundStart""a""1=0""2=0")
    
    
RegisterHam(Ham_Spawn"player""fw_HamPlayerSpawn_Post"1)
    
RegisterHam(Ham_Player_Jump"player""fw_HamPlayerJump_Post"1)
    
RegisterHam(Ham_Killed"player""fw_HamPlayerKilled_Post"1)
    
RegisterHamBots(Ham_Spawn"fw_HamPlayerSpawn_Post"1)
    
RegisterHamBots(Ham_Player_Jump"fw_HamPlayerJump_Post"1)
    
RegisterHamBots(Ham_Killed"fw_HamPlayerKilled_Post"1)
    
    
g_pCvarJumpsMax register_cvar("zpnm_jumps_max""1");
    
g_pCvarJumpsMaxResetBitsum register_cvar("zpnm_jumps_max_reset""172");
    
g_pCvarJumpsVelocity register_cvar("zpnm_jumps_velocity""265.0");
    
    
g_iItemID zp_register_extra_item("Multi-jump \y(\w+1\y)"5ZP_TEAM_HUMAN ZP_TEAM_SURVIVOR ZP_TEAM_SNIPER ZP_TEAM_ZOMBIE ZP_TEAM_ASSASSIN);
    
    new 
szMapName[32];
    
get_mapname(szMapName31)
    
    if (
containi(szMapName"escape") != -|| containi(szMapName"ze_") != -|| containi(szMapName"atix") != -1)
        
g_bEscapeMap true;
}

public 
fw_EventRoundStart()
{
    if (!(
get_pcvar_num(g_pCvarJumpsMaxResetBitsum) & 1))
        return;
    
    static 
iMaxPlayers;
    if (!
iMaxPlayers)
        
iMaxPlayers get_maxplayers();
    
    for (new 
iID 1iID <= iMaxPlayersiID++)
        
LoseItem(iID)
}

public 
client_disconnect(iID)
    
LoseItem(iID)

public 
fw_HamPlayerSpawn_Post(iID)
{
    if (
get_pcvar_num(g_pCvarJumpsMaxResetBitsum) & 2)
        
LoseItem(iID)
}

public 
zp_extra_item_selected(iIDiItemID)
{
    if (
iItemID != g_iItemID)
        return 
PLUGIN_CONTINUE;
    
    if (
g_bEscapeMap)// && !(get_user_flags(iID) & ADMIN_RCON)
    
{
        
colored_chat(iID"^3Multi-jumps are restricted on escape maps^1!")
        
        return 
ZP_PLUGIN_HANDLED;
    }
    else if (
g_iJumpsMax[iID] == get_pcvar_num(g_pCvarJumpsMax))
    {
        
colored_chat(iID"^3You already have the maximum amount of multi-jumps^1(^3%d^1)!"g_iJumpsMax[iID])
        
        return 
ZP_PLUGIN_HANDLED;
    }
    
    
g_iJumps[iID]++
    
g_iJumpsMax[iID]++
    
    
colored_chat(iID"^4You can now jump^1 %d^4 time(s) in mid-air^1."g_iJumpsMax[iID])
    
    return 
PLUGIN_CONTINUE;
}

public 
fw_HamPlayerJump_Post(iID)
{
    if (!
g_iJumpsMax[iID])
        return;
    
    if (
entity_get_int(iIDEV_INT_flags) & FL_ONGROUND)
    {
        
g_iJumps[iID] = g_iJumpsMax[iID];
        
        return;
    }
    
    if (!
g_iJumps[iID] || entity_get_int(iIDEV_INT_oldbuttons) & IN_JUMP)
        return;
    
    static 
Float:vVelocity[3];
    
    
entity_get_vector(iIDEV_VEC_velocityvVelocity)
    
vVelocity[2] = get_pcvar_float(g_pCvarJumpsVelocity);
    
    
entity_set_vector(iIDEV_VEC_velocityvVelocity)
    
    
g_iJumps[iID]--;
}

public 
zp_user_infected_pre(iIDiInfectorIDbNemesisbAssassin)
{
    if (
zp_get_user_zombie(iID))
        return;
    
    new 
iJumpsMaxResetBitsum get_pcvar_num(g_pCvarJumpsMaxResetBitsum);
    
    if (!
bAssassin && (!bNemesis && iJumpsMaxResetBitsum || bNemesis
    
&& iJumpsMaxResetBitsum 32) || bAssassin && iJumpsMaxResetBitsum 128)
        
LoseItem(iID)
}

public 
zp_user_humanized_pre(iIDbSurvivorbSniper)
{
    if (!
zp_get_user_zombie(iID))
        return;
    
    new 
iJumpsMaxResetBitsum get_pcvar_num(g_pCvarJumpsMaxResetBitsum);
    
    if (!
bSniper && (!bSurvivor && iJumpsMaxResetBitsum 16 || bSurvivor
    
&& iJumpsMaxResetBitsum 64) || bSniper && iJumpsMaxResetBitsum 256)
        
LoseItem(iID)
}

public 
fw_HamPlayerKilled_Post(iID)
{
    if (
get_pcvar_num(g_pCvarJumpsMaxResetBitsum) & 4)
        
LoseItem(iID)
}

LoseItem(const iID)
{
    if (!
g_iJumpsMax[iID])
        return;
    
    
g_iJumps[iID] = 0;
    
g_iJumpsMax[iID] = 0;
    
    
colored_chat(iID"^3You have lost your multi-jumps^1!")
}

stock colored_chat(const iTarget, const szMessage[], any:...)
{
    if (!
is_user_connected(iTarget))
        return;
    
    static 
szBuffer[192];
    
    
// Format message for player
    
vformat(szBuffer191szMessage3)
    
    new const 
D7_CHAT_TAG[] = "^1[^4ZPNM^1] "
    
    
format(szBuffer191"%s%s"D7_CHAT_TAGszBuffer)
    
    static 
msgSayText;
    if (!
msgSayText)
        
msgSayText get_user_msgid("SayText");
    
    
message_begin(MSG_ONEmsgSayText_iTarget)
    
write_byte(iTarget)
    
write_string(szBuffer)
    
message_end()

4.
PHP Code:
/*
To do:

T = needs testing
X = done
- = cancelled

[X] damageable entities that get hit take full damage
[T] make rockets not collide with other team rockets?
[T] make rockets not collide with non-solid entities?
[T] fix error log generated on invalid touched entity
[T] increase range in EngFunc_FindEntityInSphere
[T] make rockets destroy any damageable entity from other teams
[T] ignore cases where damage <= 0.0 instead of checking for distance
[T] make sure rockets don't destroy each other in case they're same team rockets
[T] emessage instead of message for death for more compatibility with other plugins
[T] rocket class name
[T] remove entities by class name
[T] ftFMEntityOriginGet model check
[T] user rpg class name on death message
[T] separate touched entity damage code
[T] make sure the player takes the full damage, then kill him
[T] only kill the player if he actually died from the rocket damage
[T] add support for damage modification by external sources
[T] get_user_team instead of cs_get_user_team
[T] fix crash related to when touching a trigger_multiple(or any other solid_trigger?) entity
    [ ] see why it is happening
[T] float velocity_by_aim
    [ ] map entities can have studio models too...
[-] only kill the player if the remaining hp is 1.0, otherwise restore old hp
[ ] cache as many things as possible and see if it increases touch rate
[ ] explode rocket after X time if it doesn't hit anything
[ ] 
*/

#include <amxmodx>
//#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

#include <cs_ham_bots_api>

#include <bitsums>
#include <D7Debug>



enum
{
    
g_iIDModHL,
    
g_iIDModCS,
    
g_iIDModDOD
}

new 
g_iBsHasBazookag_iBsCanShootg_iBsConnectedg_iBsAliveg_iIDPCVarSvMaxVelocity;

const 
g_iIDEntityRocketPev pev_iuser4;
const 
g_iIDEntityRocket 7575;

new const 
g_szClassNameRocket[] = "D7RPG";

new const 
g_szEntityRocketModel[] = "models/rpgrocket.mdl";
new const 
ROCKET_SOUND[] = "weapons/rocketfire1.wav";

new 
g_iIDCacheSpriteRocketTrailexplosionwhite;

new 
CVar_RocketDelayCVar_RocketSpeed,
CVar_RocketDmgCVar_Dmg_range;

new 
g_iMaxPlayersg_iIDMsgDeathg_iIDMod;

public 
plugin_precache()
{
    
precache_model(g_szEntityRocketModel)
    
    
g_iIDCacheSpriteRocketTrail precache_model("sprites/smoke.spr");
    
explosion precache_model("sprites/zerogxplode.spr")
    
white precache_model("sprites/white.spr")
    
    
precache_sound(ROCKET_SOUND)
}

public 
plugin_init()
{
    
register_plugin("D7 API RPG""0.2.0""D i 5 7 i n c T")
    
    
RegisterHam(Ham_Spawn"player""fwHamSpawnPlayer"1)
    
RegisterHamBots(Ham_Spawn"fwHamSpawnPlayer"1)
    
//RegisterHam(Ham_TakeDamage, "player", "fwHamTakeDamagePlayerPre")
    //RegisterHamBots(Ham_TakeDamage, "fwHamTakeDamagePlayerPre")
    //RegisterHam(Ham_TakeDamage, "player", "fwHamTakeDamagePlayer", 1)
    //RegisterHamBots(Ham_TakeDamage, "fwHamTakeDamagePlayer", 1)
    
RegisterHam(Ham_Killed"player""fwHamKilledPlayerPre")
    
RegisterHamBots(Ham_Killed"fwHamKilledPlayerPre")
    
    
register_forward(FM_Touch"fwFmTouch"1)
    
register_forward(FM_PlayerPreThink"fwFmPlayerPreThink"1)
    
    
register_clcmd("say /b""fwClCmdSayB")
    
    
g_iIDPCVarSvMaxVelocity get_cvar_pointer("sv_maxvelocity");
    
    
CVar_RocketDelay register_cvar("D7RPGDelay""0.1")
    
CVar_RocketSpeed register_cvar("D7RPGSpeed""970")
    
CVar_RocketDmg register_cvar("D7RPGDamage""5")
    
CVar_Dmg_range register_cvar("D7RPGDamageRadius""240")
    
    
g_iMaxPlayers get_maxplayers();
    
g_iIDMsgDeath get_user_msgid("DeathMsg");
    
    
//register_message(g_iIDMsgDeath, "fwMsgDeathPre")
    
    
new szModName[32];
    
get_modname(szModNamecharsmax(szModName));
    
    if (
equali(szModName"cstrike") || equali(szModName"czero") || equali(szModName"csv15") || equali(szModName"cs13"))
        
g_iIDMod g_iIDModCS;
    else if (
equali(szModName"dod"))
        
g_iIDMod g_iIDModDOD;
    else
        
g_iIDMod g_iIDModHL;
}
/*
// After fwHamKilledPlayerPre
// Before fwHamKilledPlayer
public fwMsgDeathPre(const iIDMsg, const iMsgDest, const iIDEnt)
{
    new iIDAttacker = get_msg_arg_int(1),
    iIDVictim = get_msg_arg_int(2);
    
    ftD7Log(_, _, "[fwMsgDeathPre] iIDAttacker: %d. iIDVictim: %d.", iIDAttacker, iIDVictim)
}*/

ftEntityRocketRemove(const iIDOwner 0)
{
    new 
iIDEntity = -1;
    
    
//while ((iIDEntity = engfunc(EngFunc_FindEntityInSphere, iIDEntity, Float:{ 0.0, 0.0, 0.0 }, 99999.0)) != 0)
    
while ((iIDEntity engfunc(EngFunc_FindEntityByStringiIDEntity"classname"g_szClassNameRocket)) != 0)
    {
        if (!
pev_valid(iIDEntity)
        
//|| pev(iIDEntity, g_iIDEntityRocketPev) != g_iIDEntityRocket
        
|| iIDOwner && iIDOwner != pev(iIDEntitypev_owner))
            continue;
        
        
engfunc(EngFunc_RemoveEntityiIDEntity)
    }
}

public 
client_putinserver(iID)
{
    
bitsum_add(g_iBsConnectediID)
}

public 
client_disconnect(iID)
{
    
ftEntityRocketRemove(iID)
    
    
remove_task(iID)
    
    
bitsum_del(g_iBsHasBazookaiID)
    
bitsum_del(g_iBsCanShootiID)
    
bitsum_del(g_iBsConnectediID)
    
bitsum_del(g_iBsAliveiID)
}

public 
fwHamSpawnPlayer(const iID)
{
    
//remove_task(iID)
    
    //bitsum_del(g_iBsHasBazooka, iID)
    //bitsum_del(g_iBsCanShoot, iID)
    
    
if (!is_user_alive(iID))
        return;
    
    
bitsum_add(g_iBsAliveiID)
}

public 
fwHamKilledPlayerPre(const iID)
{
    
remove_task(iID)
    
    
bitsum_del(g_iBsHasBazookaiID)
    
bitsum_del(g_iBsCanShootiID)
    
bitsum_del(g_iBsAliveiID)
}

public 
fwClCmdSayB(const iID)
{
    if (!
bitsum_get(g_iBsHasBazookaiID))
    {
        
bitsum_add(g_iBsHasBazookaiID)
        
fwTaskCanShoot(iID)
    }
    else
    {
        
ftEntityRocketRemove(iID)
        
        
remove_task(iID)
        
        
bitsum_del(g_iBsHasBazookaiID)
        
bitsum_del(g_iBsCanShootiID)
    }
}
/*
new g_iBsDeath;

public fwHamTakeDamagePlayerPre(const iIDEntity, const iIDInflictor, const iIDAttacker, Float:fDamage, const iBsDamageType)
{
    if (iBsDamageType != DMG_BLAST)
    {
        ftD7Log(_, _, "[fwHamTakeDamagePlayerPre] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Damage type is not DMG_BLAST.", iIDEntity, iIDInflictor, iIDAttacker)
        
        return;
    }
    else if (GetHamReturnStatus() == HAM_SUPERCEDE)
    {
        ftD7Log(_, _, "[fwHamTakeDamagePlayerPre] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Damage has been blocked.", iIDEntity, iIDInflictor, iIDAttacker)
        
        return;
    }
    else if (!pev_valid(iIDInflictor))
    {
        ftD7Log(_, _, "[fwHamTakeDamagePlayerPre] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Inflictor is invalid.", iIDEntity, iIDInflictor, iIDAttacker)
        
        return;
    }
    else if (pev(iIDInflictor, g_iIDEntityRocketPev) != g_iIDEntityRocket)
    {
        ftD7Log(_, _, "[fwHamTakeDamagePlayerPre] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Inflictor is not a rocket.", iIDEntity, iIDInflictor, iIDAttacker)
        
        return;
    }
    else if (get_user_health(iIDEntity) - floatround(fDamage, floatround_floor) > 0)
    {
        ftD7Log(_, _, "[fwHamTakeDamagePlayerPre] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Health: %d. Damage: %d. NOT a kill.", iIDEntity, iIDInflictor, iIDAttacker, get_user_health(iIDEntity), floatround(fDamage, floatround_floor))
        
        return;
    }
    
    //ftD7Log(_, _, "[fwHamTakeDamagePlayerPre] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Health: %d. Damage: %d. KILL.", iIDEntity, iIDInflictor, iIDAttacker, get_user_health(iIDEntity), floatround(fDamage, floatround_floor))
    
    bitsum_add(g_iBsDeath, iIDEntity)
    
    set_pev(iIDEntity, pev_health, fDamage + 1.0)
}

public fwHamTakeDamagePlayer(const iIDEntity, const iIDInflictor, const iIDAttacker, Float:fDamage, const iBsDamageType)
{
    if (iBsDamageType != DMG_BLAST)
    {
        //ftD7Log(_, _, "[fwHamTakeDamagePlayer] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Damage type is not DMG_BLAST.", iIDEntity, iIDInflictor, iIDAttacker)
        
        return;
    }
    else if (GetHamReturnStatus() == HAM_SUPERCEDE)
    {
        //ftD7Log(_, _, "[fwHamTakeDamagePlayer] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Damage has been blocked.", iIDEntity, iIDInflictor, iIDAttacker)
        
        return;
    }
    else if (!pev_valid(iIDInflictor))
    {
        //ftD7Log(_, _, "[fwHamTakeDamagePlayer] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Inflictor is invalid.", iIDEntity, iIDInflictor, iIDAttacker)
        
        return;
    }
    else if (pev(iIDInflictor, g_iIDEntityRocketPev) != g_iIDEntityRocket)
    {
        //ftD7Log(_, _, "[fwHamTakeDamagePlayer] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Inflictor is not a rocket.", iIDEntity, iIDInflictor, iIDAttacker)
        
        return;
    }
    else if (!bitsum_get(g_iBsDeath, iIDEntity))
    {
        //ftD7Log(_, _, "[fwHamTakeDamagePlayer] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. NOT a kill.", iIDEntity, iIDInflictor, iIDAttacker)
        
        return;
    }
    
    ftD7Log(_, _, "[fwHamTakeDamagePlayer] iIDEntity: %d. iIDInflictor: %d. iIDAttacker: %d. Health: %d. Damage: %d. KILL.", iIDEntity, iIDInflictor, iIDAttacker, get_user_health(iIDEntity), floatround(fDamage, floatround_floor))
    
    new iTemp = get_msg_block(g_iIDMsgDeath);
    
    set_msg_block(g_iIDMsgDeath, BLOCK_ONCE)
    
    ExecuteHamB(Ham_Killed, iIDEntity, iIDAttacker, 2)
    
    set_msg_block(g_iIDMsgDeath, iTemp)
    
    ftMsgDeathSend(iIDAttacker, iIDEntity, g_szClassNameRocket, _, iIDInflictor)
}*/

// Credits to VEN
stock ftFMEntityOriginGet(const iIDEntityFloat:fVecTemp[3])
{
    new 
szModel[2];
    
pev(iIDEntitypev_modelszModelcharsmax(szModel))
    
    if (
szModel[0] == '*')
    {
        
pev(iIDEntitypev_minsfVecTemp)
        
        static 
Float:fVecTemp2[3];
        
        
pev(iIDEntitypev_maxsfVecTemp2);
        
        
fVecTemp[0] += fVecTemp2[0];
        
fVecTemp[1] += fVecTemp2[1];
        
fVecTemp[2] += fVecTemp2[2];
        
        
fVecTemp[0] *= 0.5;
        
fVecTemp[1] *= 0.5;
        
fVecTemp[2] *= 0.5;
        
        return;
    }
    
    
pev(iIDEntitypev_originfVecTemp)
}

ftMsgDeathSend(const iIDAttacker, const iIDVictim, const szNameWeapon[] = "", const bool:bHeadShot false, const iIDInflictor 0)
{
    
message_begin(MSG_ALLg_iIDMsgDeath)
    
write_byte(iIDAttacker)
    
write_byte(iIDVictim)
    
    if (
g_iIDMod == g_iIDModCS)
    {
        
write_byte(bHeadShot//headshot
        
write_string(szNameWeapon)
    }
    else if (
g_iIDMod == g_iIDModHL)
    {
        
write_string(szNameWeapon)
    }
    else if (
g_iIDMod == g_iIDModDOD)
    {
        
write_byte(iIDInflictor//weaponid
    
}
    
    
message_end()
}

public 
fwFmTouch(iIDEntityToucheriIDEntityTouched)
{
    new 
iIDEntityRocket;
    
    if (
pev_valid(iIDEntityToucher) && pev(iIDEntityToucherg_iIDEntityRocketPev) == g_iIDEntityRocket)
        
iIDEntityRocket iIDEntityToucher;
    else if (
pev_valid(iIDEntityTouched) && pev(iIDEntityTouchedg_iIDEntityRocketPev) == g_iIDEntityRocket)
    {
        
iIDEntityRocket iIDEntityTouched;
        
        
iIDEntityTouched iIDEntityToucher;
        
iIDEntityToucher iIDEntityRocket;
    }
    else
        return;
    
    new 
iIDEntityRocketOwner pev(iIDEntityRocketpev_owner);
    
    if (
iIDEntityTouched == iIDEntityRocketOwner)
        return;
    
    new 
iEntityRocketOwnerTeam get_user_team(iIDEntityRocketOwner),
    
iIDEntityOtherOwnerFloat:fCVarDamage get_pcvar_float(CVar_RocketDmg),
    
Float:fHealthiTempFloat:fDamage;
    
    static 
szEntityClassName[32];
    
    
// Pass through dead/same team players and team entities
    
if (<= iIDEntityTouched <= g_iMaxPlayers)
    {
        if (!
bitsum_get(g_iBsAliveiIDEntityTouched) || bitsum_get(g_iBsConnectediIDEntityTouched) && iEntityRocketOwnerTeam == get_user_team(iIDEntityTouched))
        {
            
ftD7Log(__"[fwFmTouch] Touched entity is an either dead or a connected and on the same team player as the rocket owner. Ignoring.")
            
            return;
        }
        
        if (
fCVarDamage 0.0)
        {
            
pev(iIDEntityTouchedpev_healthfHealth)
            
set_pev(iIDEntityTouchedpev_health10000000.0)
            
            
ExecuteHamB(Ham_TakeDamageiIDEntityTouchediIDEntityRocketiIDEntityRocketOwnerfCVarDamageDMG_BLAST)
            
            
fDamage 10000000.0 get_user_health(iIDEntityTouched);
            
            
ftD7Log(__"[fwFmTouch] fHealth: %f. fDamage: %f."fHealthfDamage)
            
            if (
fHealth fDamage)
            {
                
//if (fHealth < 1.0)
                //{
                //    ftD7Log(_, _, "[fwFmTouch] Player in explosion range has health between 0 and 1. fHealth: %f.", fHealth)
                //}
                
fHealth -= fDamage;
                
set_pev(iIDEntityTouchedpev_healthfHealth)
            }
            else
            {
                
ftD7Log(__"[fwFmTouch] Player hit should be dead. Executing Ham_Killed with custom death message.")
                
                
//set_pev(iIDEntityTouched, pev_health, 1.0)
                //ExecuteHam(Ham_Spawn, iIDEntityTouched)
                //engfunc(EngFunc_SetOrigin, iIDEntityTouched, fVecOriginEntityInSphere)
                
                
iTemp get_msg_block(g_iIDMsgDeath);
                
                
set_msg_block(g_iIDMsgDeathBLOCK_ONCE)
                
                
ExecuteHamB(Ham_KillediIDEntityTouchediIDEntityRocketOwner2)
                
                
set_msg_block(g_iIDMsgDeathiTemp)
                
                
ftMsgDeathSend(iIDEntityRocketOwneriIDEntityTouchedg_szClassNameRocket_iIDEntityRocket)
            }
        }
    }
    else if (
pev_valid(iIDEntityTouched))
    {
        if (
pev(iIDEntityTouchedpev_solid) <= SOLID_TRIGGER)
            return;
        
        
iIDEntityOtherOwner pev(iIDEntityTouchedpev_owner);
        
        if ((
<= iIDEntityOtherOwner <= g_iMaxPlayers) && bitsum_get(g_iBsConnectediIDEntityOtherOwner) && iEntityRocketOwnerTeam == get_user_team(iIDEntityOtherOwner))
            return;
        
        if (
fCVarDamage 0.0)
        {
            
pev(iIDEntityTouchedpev_healthfHealth)
            
            
//ftD7Log(_, _, "[fwFmTouch] iIDEntityRocket: %d. iIDEntityTouched: %d. Damage: %f. Health: %f.",
            //iIDEntityRocket, iIDEntityTouched, fCVarDamage, fHealth)
            
            
if (fHealth 0.0)
            {
                
pev(iIDEntityTouchedpev_takedamagefDamage)
                
                if (
fDamage != 0.0)
                {
                    
ExecuteHamB(Ham_TakeDamageiIDEntityTouchediIDEntityRocketiIDEntityRocketOwnerfCVarDamageDMG_BLAST)
                }
                else
                {
                    
pev(iIDEntityTouchedpev_classnameszEntityClassNamecharsmax(szEntityClassName))
                    
                    if (
equali(szEntityClassName"func_breakable"))
                        
ExecuteHamB(Ham_TakeDamageiIDEntityTouchediIDEntityRocketiIDEntityRocketOwnerfCVarDamageDMG_BLAST)
                }
            }
        }
        
        
pev(iIDEntityTouchedpev_classnameszEntityClassNamecharsmax(szEntityClassName))
        
ftD7Log(__"[fwFmTouch] iIDEntityToucher: %d. iIDEntityTouched: %d. iIDEntityRocket: %d. Touched class name: ^"%s^"."iIDEntityToucheriIDEntityTouchediIDEntityRocketszEntityClassName)
    }
    
    static 
Float:fVecOrigin[3], Float:fVecOriginEntityInSphere[3];
    
    
pev(iIDEntityRocketpev_originfVecOrigin)
    
    new 
iIDEntityInSphere = -1Float:fCVarRadius get_pcvar_float(CVar_Dmg_range);
    
    
//ftD7Log(_, _, "[fwFmTouch] iIDEntityRocket: %d. fVecOrigin: %f, %f, %f.", iIDEntityRocket, fVecOrigin[0], fVecOrigin[1], fVecOrigin[2])
    
    
while ((iIDEntityInSphere engfunc(EngFunc_FindEntityInSphereiIDEntityInSpherefVecOriginfCVarRadius)) != 0)
    {
        if (
iIDEntityInSphere == iIDEntityRocket
        
|| iIDEntityInSphere == iIDEntityRocketOwner
        
|| iIDEntityInSphere == iIDEntityTouched)
            continue;
        
        
//pev(iIDEntityInSphere, pev_classname, szEntityClassName, charsmax(szEntityClassName))
        //ftD7Log(_, _, "[fwFmTouch] iIDEntityInSphere: %d. Class name: ^"%s^".", iIDEntityInSphere, szEntityClassName)
        
        
if (<= iIDEntityInSphere <= g_iMaxPlayers)
        {
            if (!
bitsum_get(g_iBsAliveiIDEntityInSphere)
            || 
iEntityRocketOwnerTeam == get_user_team(iIDEntityInSphere))
                continue;
            
            
pev(iIDEntityInSpherepev_originfVecOriginEntityInSphere)
            
            
fDamage fCVarDamage - (fCVarDamage fCVarRadius get_distance_f(fVecOriginfVecOriginEntityInSphere));
            
            
//ftD7Log(_, _, "[fwFmTouch] iIDEntityRocket: %d. iIDEntityInSphere: %d. fVecOriginEntityInSphere: %f, %f, %f. Damage: %f.",
            //iIDEntityRocket, iIDEntityInSphere, fVecOriginEntityInSphere[0], fVecOriginEntityInSphere[1], fVecOriginEntityInSphere[2], fDamage)
            //ftD7Log(_, _, "[fwFmTouch] iIDEntityRocket: %d. iIDEntityInSphere: %d. Damage: %f.",
            //iIDEntityRocket, iIDEntityInSphere, fDamage)
            
            
if (fDamage 1.0)
                continue;
            
/*
            engfunc(EngFunc_MessageBegin, MSG_ALL, SVC_TEMPENTITY, fVecOrigin, 0)
            write_byte(TE_LIGHTNING)
            engfunc(EngFunc_WriteCoord, fVecOrigin[0])
            engfunc(EngFunc_WriteCoord, fVecOrigin[1])
            engfunc(EngFunc_WriteCoord, fVecOrigin[2])
            engfunc(EngFunc_WriteCoord, fVecOriginEntityInSphere[0])
            engfunc(EngFunc_WriteCoord, fVecOriginEntityInSphere[1])
            engfunc(EngFunc_WriteCoord, fVecOriginEntityInSphere[2])
            write_byte(25) //life in 0.1's
            write_byte(25) //width in 0.1's
            write_byte(0) //amplitude in 0.01's
            write_short(g_iIDCacheSpriteRocketTrail) //sprite model index
            message_end()*/
            
            
pev(iIDEntityInSpherepev_healthfHealth)
            
set_pev(iIDEntityInSpherepev_health10000000.0)
            
            
ExecuteHamB(Ham_TakeDamageiIDEntityInSphereiIDEntityRocketiIDEntityRocketOwnerfDamageDMG_BLAST)
            
            
fDamage 10000000.0 get_user_health(iIDEntityInSphere);
            
            
ftD7Log(__"[fwFmTouch] fHealth: %f. fDamage: %f."fHealthfDamage)
            
            if (
fHealth fDamage)
            {
                
//if (fHealth < 1.0)
                //{
                //    ftD7Log(_, _, "[fwFmTouch] Player in explosion range has health between 0 and 1. fHealth: %f.", fHealth)
                //}
                
fHealth -= fDamage;
                
set_pev(iIDEntityInSpherepev_healthfHealth)
                
                continue;
            }
            
            
ftD7Log(__"[fwFmTouch] Player in explosion range should be dead. Executing Ham_Killed with custom death message.")
            
            
//set_pev(iIDEntityInSphere, pev_health, 1.0)
            //ExecuteHam(Ham_Spawn, iIDEntityInSphere)
            //engfunc(EngFunc_SetOrigin, iIDEntityInSphere, fVecOriginEntityInSphere)
            
            
iTemp get_msg_block(g_iIDMsgDeath);
            
            
set_msg_block(g_iIDMsgDeathBLOCK_ONCE)
            
            
ExecuteHamB(Ham_KillediIDEntityInSphereiIDEntityRocketOwner2)
            
            
set_msg_block(g_iIDMsgDeathiTemp)
            
            
ftMsgDeathSend(iIDEntityRocketOwneriIDEntityInSphereg_szClassNameRocket_iIDEntityRocket)
        }
        else if (
pev_valid(iIDEntityInSphere))
        {
            
pev(iIDEntityInSpherepev_healthfHealth)
            
            if (
fHealth <= 0.0)
                continue;
            
            
iIDEntityOtherOwner pev(iIDEntityInSpherepev_owner);
            
            if ((
<= iIDEntityOtherOwner <= g_iMaxPlayers) && bitsum_get(g_iBsConnectediIDEntityOtherOwner) && iEntityRocketOwnerTeam == get_user_team(iIDEntityOtherOwner))
                continue;
            
            
pev(iIDEntityInSpherepev_takedamagefDamage)
            
            if (
fDamage == 0.0)
            {
                
pev(iIDEntityInSpherepev_classnameszEntityClassNamecharsmax(szEntityClassName))
                
                if (!
equali(szEntityClassName"func_breakable"))
                    continue;
            }
            
            
ftFMEntityOriginGet(iIDEntityInSpherefVecOriginEntityInSphere)
            
//pev(iIDEntityInSphere, pev_origin, fVecOriginEntityInSphere)
            
            
fDamage fCVarDamage - (fCVarDamage fCVarRadius get_distance_f(fVecOriginfVecOriginEntityInSphere));
            
            
//ftD7Log(_, _, "[fwFmTouch] iIDEntityRocket: %d. iIDEntityInSphere: %d. fVecOriginEntityInSphere: %f, %f, %f. Damage: %f.",
            //iIDEntityRocket, iIDEntityInSphere, fVecOriginEntityInSphere[0], fVecOriginEntityInSphere[1], fVecOriginEntityInSphere[2], fDamage)
            
            
if (fDamage <= 0.0)
                continue;
            
            
ftD7Log(__"[fwFmTouch] iIDEntityRocket: %d. iIDEntityInSphere: %d. Damage: %f. Health: %f.",
            
iIDEntityRocketiIDEntityInSpherefDamagefHealth)
            
/*
            engfunc(EngFunc_MessageBegin, MSG_ALL, SVC_TEMPENTITY, fVecOrigin, 0)
            write_byte(TE_LIGHTNING)
            engfunc(EngFunc_WriteCoord, fVecOrigin[0])
            engfunc(EngFunc_WriteCoord, fVecOrigin[1])
            engfunc(EngFunc_WriteCoord, fVecOrigin[2])
            engfunc(EngFunc_WriteCoord, fVecOriginEntityInSphere[0])
            engfunc(EngFunc_WriteCoord, fVecOriginEntityInSphere[1])
            engfunc(EngFunc_WriteCoord, fVecOriginEntityInSphere[2])
            write_byte(25) //life in 0.1's
            write_byte(25) //width in 0.1's
            write_byte(0) //amplitude in 0.01's
            write_short(g_iIDCacheSpriteRocketTrail) //sprite model index
            message_end()*/
            
            
ExecuteHamB(Ham_TakeDamageiIDEntityInSphereiIDEntityRocketiIDEntityRocketOwnerfDamageDMG_BLAST)
        }
    }
    
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYfVecOrigin0)
    
write_byte(TE_EXPLOSION)
    
engfunc(EngFunc_WriteCoordfVecOrigin[0])
    
engfunc(EngFunc_WriteCoordfVecOrigin[1])
    
engfunc(EngFunc_WriteCoordfVecOrigin[2])
    
write_short(explosion)
    
write_byte(30)
    
write_byte(15)
    
write_byte(0)
    
message_end()
    
/*
    // Smallest ring
    engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, fVecOrigin, 0)
    write_byte(TE_BEAMCYLINDER) // TE id
    engfunc(EngFunc_WriteCoord, fVecOrigin[0]) // x
    engfunc(EngFunc_WriteCoord, fVecOrigin[1]) // y
    engfunc(EngFunc_WriteCoord, fVecOrigin[2]) // z
    engfunc(EngFunc_WriteCoord, fVecOrigin[0]) // x axis
    engfunc(EngFunc_WriteCoord, fVecOrigin[1]) // y axis
    engfunc(EngFunc_WriteCoord, fVecOrigin[2] + (fCVarRadius * 2) - (fCVarRadius * 2 / 3)) // z axis 385.0
    write_short(white) // sprite
    write_byte(0) // startframe
    write_byte(0) // framerate
    write_byte(4) // life
    write_byte(72) // width
    write_byte(0) // noise
    write_byte(255) // red
    write_byte(255) // green 100
    write_byte(255) // blue
    write_byte(200) // brightness
    write_byte(0) // speed
    message_end()
    
    // Medium ring
    engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, fVecOrigin, 0)
    write_byte(TE_BEAMCYLINDER) // TE id
    engfunc(EngFunc_WriteCoord, fVecOrigin[0]) // x
    engfunc(EngFunc_WriteCoord, fVecOrigin[1]) // y
    engfunc(EngFunc_WriteCoord, fVecOrigin[2]) // z
    engfunc(EngFunc_WriteCoord, fVecOrigin[0]) // x axis
    engfunc(EngFunc_WriteCoord, fVecOrigin[1]) // y axis
    engfunc(EngFunc_WriteCoord, fVecOrigin[2] + (fCVarRadius * 2) - (fCVarRadius * 2 / 6)) // z axis
    write_short(white) // sprite
    write_byte(0) // startframe
    write_byte(0) // framerate
    write_byte(4) // life
    write_byte(72) // width
    write_byte(0) // noise
    write_byte(255) // red
    write_byte(255) // green 100
    write_byte(255) // blue
    write_byte(200) // brightness
    write_byte(0) // speed
    message_end()
    */
    // Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYfVecOrigin0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordfVecOrigin[0]) // x
    
engfunc(EngFunc_WriteCoordfVecOrigin[1]) // y
    
engfunc(EngFunc_WriteCoordfVecOrigin[2]) // z
    
engfunc(EngFunc_WriteCoordfVecOrigin[0]) // x axis
    
engfunc(EngFunc_WriteCoordfVecOrigin[1]) // y axis
    
engfunc(EngFunc_WriteCoordfVecOrigin[2] + (fCVarRadius 2)) // z axis
    
write_short(white// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(72// width
    
write_byte(0// noise
    
write_byte(255// red
    
write_byte(255// green 100
    
write_byte(255// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
engfunc(EngFunc_RemoveEntityiIDEntityRocket)
}

ftFmVelocityByAim(const iID, const Float:fAmountFloat:fVecTemp[3])
{
    
pev(iIDpev_v_anglefVecTemp)
    
angle_vector(fVecTempANGLEVECTOR_FORWARDfVecTemp)
    
    
fVecTemp[0] *= fAmount;
    
fVecTemp[1] *= fAmount;
    
fVecTemp[2] *= fAmount;
}

public 
fwFmPlayerPreThink(iID)
{
    
//ftD7Log(_, iID, "[client_PreThink] iID: %d.", iID)
    
    
if (!bitsum_get(g_iBsHasBazookaiID) || !bitsum_get(g_iBsCanShootiID))
    {
        
//ftD7Log(_, iID, "[client_PreThink] No bazooka/can't shoot.")
        
        
return;
    }
    
    new 
iBsButtons pev(iIDpev_button);
    
    if (!(
iBsButtons IN_ATTACK2))
    {
        
//ftD7Log(_, iID, "[client_PreThink] Not holding buttons.")
        
        
return;
    }
    
    
set_pev(iIDpev_button, (iBsButtons & ~IN_ATTACK2))
    
    static 
iIDAllocString;
    
    if(!
iIDAllocString)
    {
        
//ftD7Log(_, iID, "[client_PreThink] String not allocated. Allocating.")
        
        
iIDAllocString engfunc(EngFunc_AllocString"info_target"); // alloc string once per load
    
}
    
    new 
iIDEntity engfunc(EngFunc_CreateNamedEntityiIDAllocString);
    
    if (!
pev_valid(iIDEntity))
    {
        
//ftD7Log(_, iID, "[client_PreThink] Entity failed to create!")
        
        
return;
    }
    
    
set_pev(iIDEntitypev_classnameg_szClassNameRocket)
    
set_pev(iIDEntityg_iIDEntityRocketPevg_iIDEntityRocket)
    
set_pev(iIDEntitypev_owneriID)
    
    static 
Float:fVecTemp[3];
    
    
pev(iIDpev_v_anglefVecTemp)
    
fVecTemp[0] *= -1;
    
set_pev(iIDEntitypev_anglesfVecTemp)
    
    
set_pev(iIDEntitypev_solidSOLID_TRIGGER)
    
set_pev(iIDEntitypev_movetypeMOVETYPE_FLY)
    
    new 
Float:fEntMaxVelocity get_pcvar_float(g_iIDPCVarSvMaxVelocity);
    
    
ftFmVelocityByAim(iIDfloatclamp(get_pcvar_float(CVar_RocketSpeed), -fEntMaxVelocityfEntMaxVelocity), fVecTemp)
    
set_pev(iIDEntitypev_velocityfVecTemp)
    
    
set_pev(iIDEntitypev_effects, (pev(iIDEntitypev_effects) | EF_LIGHT))
    
    static 
Float:fVecTemp2[3];
    
    
pev(iIDpev_originfVecTemp)
    
pev(iIDpev_view_ofsfVecTemp2)
    
fVecTemp[0] += fVecTemp2[0];
    
fVecTemp[1] += fVecTemp2[1];
    
fVecTemp[2] += fVecTemp2[2];
    
engfunc(EngFunc_SetOriginiIDEntityfVecTemp)
    
    
engfunc(EngFunc_SetModeliIDEntityg_szEntityRocketModel)
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_BEAMFOLLOW);
    
write_short(iIDEntity);
    
write_short(g_iIDCacheSpriteRocketTrail);
    
write_byte(11);
    
write_byte(5);
    
write_byte(191);
    
write_byte(191);
    
write_byte(191);
    
write_byte(random_num(150240));
    
message_end();
    
    
emit_sound(iIDEntityCHAN_WEAPONROCKET_SOUND1.0ATTN_NORM0PITCH_NORM)
    
    
bitsum_del(g_iBsCanShootiID)
    
    
set_task(get_pcvar_float(CVar_RocketDelay), "fwTaskCanShoot"iID)
}

public 
fwTaskCanShoot(const iID)
{
    
bitsum_add(g_iBsCanShootiID)
    
    
client_print(iIDprint_center"Your can now shoot the next rocket!")

__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-12-2017 , 08:16   Re: Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #9

@hamlet
2. Thanks, will try it out later.
3. What are the waterlevel values? 1-x?

@klippy
I see, thanks, I'll ask for what I'll need.

@georgik
3. That's more complicated than other multijump codes

4. Is this the rocket message because I just need to know about the rocket.
PHP Code:
    engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYfVecOrigin0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordfVecOrigin[0]) // x
    
engfunc(EngFunc_WriteCoordfVecOrigin[1]) // y
    
engfunc(EngFunc_WriteCoordfVecOrigin[2]) // z
    
engfunc(EngFunc_WriteCoordfVecOrigin[0]) // x axis
    
engfunc(EngFunc_WriteCoordfVecOrigin[1]) // y axis
    
engfunc(EngFunc_WriteCoordfVecOrigin[2] + (fCVarRadius 2)) // z axis
    
write_short(white// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(72// width
    
write_byte(0// noise
    
write_byte(255// red
    
write_byte(255// green 100
    
write_byte(255// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end() 
__________________
edon1337 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-12-2017 , 08:21   Re: Orpheu Functions | Read File | Multijump | Rocket | Random Players
Reply With Quote #10

From pev_research topic:
PHP Code:
/**
     * 0 - Not in water
     * 1 - Waiding
     * 2 - Mostly submerged
     * 3 - Completely submerged
     *
     * Type: integer
*/
pev_waterlevel
About the multijump, it's more complicated because it does other stuffs, not just multijump. What you need to check is Ham_Jump code. Removing zp specific stuff you end up with:
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>


new g_pCvarJumpsVelocityg_iJumps[33], g_iJumpsMax[33];

public 
plugin_init()
{
    
register_plugin("[ZPNM] Item: MultiJump""0.1.2""twistedeuphoria, Dabbi, B!gBud, D i 5 7 i n c T")
    
    
RegisterHam(Ham_Player_Jump"player""fw_HamPlayerJump_Post"1)
   
    
g_pCvarJumpsVelocity register_cvar("zpnm_jumps_velocity""265.0");
  
}

public 
fw_HamPlayerJump_Post(iID)
{
    if (!
g_iJumpsMax[iID])
        return;
    
    if (
entity_get_int(iIDEV_INT_flags) & FL_ONGROUND)
    {
        
g_iJumps[iID] = g_iJumpsMax[iID];
        
        return;
    }
    
    if (!
g_iJumps[iID] || entity_get_int(iIDEV_INT_oldbuttons) & IN_JUMP)
        return;
    
    static 
Float:vVelocity[3];
    
    
entity_get_vector(iIDEV_VEC_velocityvVelocity)
    
vVelocity[2] = get_pcvar_float(g_pCvarJumpsVelocity);
    
    
entity_set_vector(iIDEV_VEC_velocityvVelocity)
    
    
g_iJumps[iID]--;

Learn to extract what you need, remove the unrelated stuffs.

4.There is no rocket message, you must create an entity and make it to move. That message is just an effect.
__________________

Last edited by HamletEagle; 02-12-2017 at 08:32.
HamletEagle is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode