Raised This Month: $ Target: $400
 0% 

Prokreedz , checkpoint while ducking


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aDr.
Member
Join Date: Oct 2006
Old 01-31-2007 , 07:54   Prokreedz , checkpoint while ducking
Reply With Quote #1

Please sombody who know to make amxx plugins , help me and make prokreedz to suport checkpoint while ducking , 10x
Attached Files
File Type: sma Get Plugin or Get Source (prokreedz.sma - 773 views - 39.4 KB)
aDr. is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-31-2007 , 09:32   Re: Prokreedz , checkpoint while ducking
Reply With Quote #2

There is a reason its disabled...
When you load that checkpoint you will probably get stucked to the ground.
But if you wanna edit it anyway:

lines 258-261:
Code:
            if(entity_get_int(id,EV_INT_flags)&FL_DUCKING) {                 client_print(id,print_chat,"[ProKreedz] You can not create a checkpoint while ducking")                 return PLUGIN_HANDLED             }
Delete them.
[ --<-@ ] Black Rose is offline
aDr.
Member
Join Date: Oct 2006
Old 01-31-2007 , 09:50   Re: Prokreedz , checkpoint while ducking
Reply With Quote #3

10x , but like u have say, i get stuck when i teleport to a duck checkpoint , there must be another way , like in kz jump plugin
aDr. is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-31-2007 , 10:06   Re: Prokreedz , checkpoint while ducking
Reply With Quote #4

but if you duck when you teleport to that checkpoint and then get up you wont get stuck...

EDIT:
This code forces the people to duck when teleporting to a(ny) checkpoint.

line 400 somewhere.
Replace "entity_set_origin(id,checkpoints[id-1][cp])" with this code.
Code:
if ( entity_get_int(id, EV_INT_flags) & FL_DUCKING ) {     // First check, maby they're allready ducking.     entity_set_origin(id,checkpoints[id-1][cp]) } else {     client_cmd(id, "+duck")     entity_set_origin(id,checkpoints[id-1][cp])     client_cmd(id, "-duck") }
Though, I don't know if it will work. The player might not duck fast enough. But I think that won't happen.

Last edited by [ --<-@ ] Black Rose; 01-31-2007 at 10:17.
[ --<-@ ] Black Rose is offline
aDr.
Member
Join Date: Oct 2006
Old 01-31-2007 , 10:44   Re: Prokreedz , checkpoint while ducking
Reply With Quote #5

The players dont duck fast enought , and get stuck in the wall , like u have say
aDr. is offline
aDr.
Member
Join Date: Oct 2006
Old 01-31-2007 , 10:54   Re: Prokreedz , checkpoint while ducking
Reply With Quote #6

}

set_pev(id, pev_velocity, {0, 0, 0}); // Reset velocity
set_pev(id, pev_origin, cp_origin);
kz_show_hud(id, 128, 0, 128, 0.29, 0.89, "You have been teleported to your checkpoint.");
delay_duck(id);

gc_count[id]++;
}

return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}

delay_duck(id)
{
set_task(0.01, "force_duck", id);
_fm_set_entity_flags(id, FL_DUCKING, 1);
}

public force_duck(id)
{
_fm_set_entity_flags(id, FL_DUCKING, 1);
}

This is in Kz Jump Plugin , but i dont know what i have to do , where to put these code , or what to change

Last edited by aDr.; 01-31-2007 at 11:39.
aDr. is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-31-2007 , 13:37   Re: Prokreedz , checkpoint while ducking
Reply With Quote #7

public delayteleport needs two arguments, id and cp:

Code:
public goto_cp(id,cp) {      new semiclip = get_pcvar_num(kz_semiclip)      new params[2]      params[0] = id      if(semiclip == -1 || (!noblock[id-1] && semiclip == 0)) {          new Float:origin[3]          for(new i=1;i<=get_maxplayers();i++) {              if(id != i && is_user_connected(i) && is_user_alive(id)) {                  if(semiclip == -1 || (!noblock[i-1] && semiclip == 0)) {                      entity_get_vector(i,EV_VEC_origin,origin)                      if(get_distance_f(checkpoints[id-1][cp],origin) <= CP_DISTANCE) {                          client_print(id,print_chat,"[ProKreedz] Somebody is too close to your checkpoint")                          return false                      }                  }              }          }      }      if ( entity_get_int(id, EV_INT_flags) & FL_DUCKING )          delay_teleport(id)      else {   params[1] = cp //set it here, because it has to pass these checks anyway.          client_cmd(id, "+duck")          set_task(1.0, "delay_teleport", id)   set_task(1.0,"func",1111+id,arguments,2) //we send out 2 parameters(ID, and CP)          set_task(1.2, "stop_duck", id)      }      return true  }  public delay_teleport(arguments[]) {      new id = arguments[0]      new cp = arguments[1]      entity_set_origin(id,checkpoints[id-1][cp])      entity_set_vector(id,EV_VEC_velocity,Float:{0.0,0.0,0.0})      spawnsprite(checkpoints[id-1][cp])      set_user_gravity(id) // to fix the low gravity bug on kz_man_redrock (thanks to NoEx)      noblock_task()  }
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-31-2007 , 13:38   Re: Prokreedz , checkpoint while ducking
Reply With Quote #8

That will give you errors.

bcas of
Code:
delay_teleport(id)
Code:
public delay_teleport(arguments[])
[ --<-@ ] Black Rose is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-31-2007 , 13:40   Re: Prokreedz , checkpoint while ducking
Reply With Quote #9

yes sorry for that, wasn't able to compile here.
But i see that you posted the right code just before me.
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
aDr.
Member
Join Date: Oct 2006
Old 02-01-2007 , 03:21   Re: Prokreedz , checkpoint while ducking
Reply With Quote #10

Good job , now works great , a little bit slow , but no more stuck , and , works ,10x for helping me , big big thanx, i will post the sma for people who wanna this modified plugin ,
Attached Files
File Type: sma Get Plugin or Get Source (prokreedz.sma - 354 views - 39.9 KB)
aDr. 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 00:41.


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