AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   bouncing player (https://forums.alliedmods.net/showthread.php?t=61317)

Exolent[jNr] 09-26-2007 17:20

bouncing player
 
is it possible to make a player bounce as if he were in a bubble?

i tried:
Code:
set_pev(id, pev_movetype, MOVETYPE_BOUNCE);

but that didnt work at all and i dont know what to do...

edit:
also, how would i get a players id if i found him/her this way:

Code:
new ent; while((ent = fm_find_ent_in_sphere(ent, "player", 1000.0)) {    // get player's id and continue with coding... }

Alka 09-27-2007 08:36

Re: bouncing player
 
Player id finded is "ent" and you must check if he is connected & valid! ;)

purple_pixie 09-27-2007 08:42

Re: bouncing player
 
A player's id is the same as their entity id, as Alka said ( I think )

so player 1 = entity 1.

Alka 09-27-2007 09:36

Re: bouncing player
 
Nope, i don't think player 1 is ent 1. But in that case when finding an ent in sphere , ent finded is player index & as i said
Quote:

Originally Posted by Alka
he is connected & valid!


[ --<-@ ] Black Rose 09-27-2007 09:39

Re: bouncing player
 
Quote:

Originally Posted by Alka (Post 536198)
Nope, i don't think player 1 is ent 1. But in that case when finding an ent in sphere , ent finded is player index & as i said

Player 1 IS ent 1.
Is this hard to understand?

Alka 09-27-2007 10:12

Re: bouncing player
 
You will never understand BLACK-NB-ROSE

[ --<-@ ] Black Rose 09-27-2007 11:48

Re: bouncing player
 
I allready understood it. So your point being?

Exolent[jNr] 09-27-2007 16:24

Re: bouncing player
 
ok thanks guys but what about making a player bounce?

[ --<-@ ] Black Rose 09-28-2007 09:09

Re: bouncing player
 
My guess is that MOVEMENT_BOUNCE doesn't work with players.
But I've never tryed it myself.

This is not a working code, ent is undefined.
Code:
#include <amxmodx> #include <fakemeta> public test() {         new ent;         new Float:origin[3], Float:p_origin[3];     pev(ent, pev_origin, origin);         new i, maxplayers = get_maxplayers()         while ( i++ < maxplayers ) {                 if ( ! is_user_connected(i) || ! is_user_alive(i) )             continue;                 pev(ent, pev_origin, origin);                 if ( get_distance() > 1000 )             continue;                 set_pev(i, pev_movetype, MOVETYPE_BOUNCE)     } }

Sylwester 09-28-2007 14:26

Re: bouncing player
 
check this plugin:
http://forums.alliedmods.net/showthread.php?t=21897
it may contain the code you need


All times are GMT -4. The time now is 16:12.

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