Raised This Month: $ Target: $400
 0% 

Prokreedz help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-17-2007 , 10:45   Re: Prokreedz help
Reply With Quote #10

Delete the origin line, I don't know how it ended up there... maybe my fault, not sure.

It compiles now, at least.

PHP Code:
public checkpoint(id) {
 if(
get_pcvar_num(kz_checkpoints) == 1) {
  if(
is_user_alive(id)) {
   new 
Float:velocity[3]
   
entity_get_vector(id,EV_VEC_velocity,velocity)
   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
   
}
   else if(
velocity[2]!=0)
   {
    
client_print(id,print_chat,"[ProKreedz] You must be on the ground to create a checkpoint")
    return 
PLUGIN_HANDLED
   
}
   
   for(new 
i=MAX_CPS-1;i>0;i--) {
    
checkpoints[id-1][i][0] = checkpoints[id-1][i-1][0]
    
checkpoints[id-1][i][1] = checkpoints[id-1][i-1][1]
    
checkpoints[id-1][i][2] = checkpoints[id-1][i-1][2]
   }
   new 
Float:origin[3]
   
entity_get_vector(id,EV_VEC_origin,origin)
   
checkpoints[id-1][0][0] = origin[0]
   
checkpoints[id-1][0][1] = origin[1]
   
checkpoints[id-1][0][2] = origin[2]
   
   if(
checkpointnum[id-1] > 0)
    
client_print(id,print_chat,"[ProKreedz] Checkpoint no. %d created, distance to the previous one: %dm",checkpointnum[id-1]+1,floatround(get_distance_f(checkpoints[id-1][1],origin) / 20,floatround_round))
   else
    
client_print(id,print_chat,"[ProKreedz] First checkpoint created")
   
checkpointnum[id-1]++
  }
  else
   
client_print(id,print_chat,"[ProKreedz] You have to be alive to use this function")
 }
 else
  
client_print(id,print_chat,"[ProKreedz] Checkpoints are disabled")
 
 return 
PLUGIN_HANDLED

__________________
Bad_Bud is offline
 



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 22:21.


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