AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   All pev's (https://forums.alliedmods.net/showthread.php?t=56762)

bwgrubbs1 06-20-2007 13:58

All pev's
 
Are all pev's based on the 1.0 for normal scale ?

or is there someplace i can check to see what normal pev is for each pev and so forth ?

I use this for REF.

http://www.amxmodx.org/funcwiki.php?...d=16#const_pev

stupok 06-20-2007 22:21

Re: All pev's
 
It's a bit more complicated than that. pev's can be strings or floats or float arrays.

Setting pev_gravity to 1.0 means normal gravity, if you're wondering.

bwgrubbs1 06-21-2007 01:59

Re: All pev's
 
actually looking to change someones velocity... when touching an entity...

I have this...

Code:
public client_PreThink(id) {     if(!is_user_alive(id))         return PLUGIN_CONTINUE;     new flags = entity_get_int(id, EV_INT_flags);     if(haslowgrav[id])     {         if(flags & FL_ONGROUND)         {             set_pev(id,pev_gravity,1.0);             haslowgrav[id] = false;             return PLUGIN_CONTINUE;         }     }     if(hasboost[id])     {         if(flags & FL_ONGROUND)         {             set_pev(id,pev_velocity,{1.0, 1.0, 1.0});             hasboost[id] = false;             return PLUGIN_CONTINUE;         }     }     return PLUGIN_CONTINUE; } public fwdTouch(ent, id) {     new Float:velocity[] = {0.0, 128.0, 0.0};     static szClassname[33];     pev(ent, pev_classname, szClassname, 32);     //...     //...     //what I am trying to do with this entity, is...     //when you touch it it will boost you forwards...     //as if you got thrown forward REALLY FAST.     //and when you land on ground you go back to normal.     else if(equali(szClassname, "booster"))     {         set_pev(id,pev_velocity,velocity);         hasboost[id] = true;         return PLUGIN_HANDLED_MAIN;     }     return PLUGIN_HANDLED_MAIN; }

As of now when i touch my entity it just does nothing.

_Master_ 06-21-2007 05:22

Re: All pev's
 
Engine and Fakemeta ?!?

Add this in plugin_init()
PHP Code:

register_forward(FM_PlayerPreThink"client_PreThink"

Change
PHP Code:

new flags entity_get_int(idEV_INT_flags

to
PHP Code:

new flags pev(idpev_flags

remove
PHP Code:

#include <engine> 

Set pev_velocity based on current player velocity not to some fixed values. Doing this will affect (to some extent) your prethink.

Also why did you post this in a new thread if you already had another one related to this ?


All times are GMT -4. The time now is 21:24.

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