Raised This Month: $ Target: $400
 0% 

amx parachute


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 03-22-2005 , 09:32   amx parachute
Reply With Quote #1

i ported this but it gave no errors at compiling but when i buy a parachute and wanna use it it doens't work
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <cstrike> new bool:has_parachute[33] new para_ent[33] public plugin_init() {     register_plugin("AMX Parachute", "0.1.1", "KRoT@L")     register_concmd("say buy_parachute", "buy_parachute")     register_cvar("parachute_cost", "2000") } public plugin_precache() {     precache_model("models/parachute.mdl") } public client_connect(id) {     has_parachute[id] = false     para_ent[id] = 0 } public buy_parachute(id) {     if(has_parachute[id])     {         client_print(id, print_chat, "[AMXX] You already have a parachute.")         return PLUGIN_HANDLED           }     new money = cs_get_user_money(id)     new cost = get_cvar_num("parachute_cost")     if(money < cost)     {         client_print(id, print_chat, "[AMXX] You don't have enough money ($%i needed).", cost)         return PLUGIN_CONTINUE     }     cs_set_user_money(id, money - cost)     client_print(id, print_chat, "[AMXX] You have bought a parachute. To use it, press +use while falling.")     has_parachute[id] = true     return PLUGIN_CONTINUE } public client_prethink(id) {     if(!is_user_alive(id))     {         return PLUGIN_CONTINUE     }     if(has_parachute[id] || get_user_flags(id) & ADMIN_LEVEL_A)     {         if(get_user_button(id) & IN_USE)         {             if(!(get_user_oldbutton(id) & IN_USE))             {                 para_ent[id] = create_entity("info_target")                 if(para_ent[id] > 0)                 {                     entity_set_model(para_ent[id], "models/parachute.mdl")                 }             }             if(!(get_entity_flags(id) & FL_ONGROUND))             {                 new Float:velocity[3]                 entity_get_vector(id, EV_VEC_velocity, velocity)                 if(velocity[2] < 0)                 {                     velocity[2] = (velocity[2] + 40.0 < -100) ? velocity[2] + 40.0 : -100.0                     entity_set_vector(id, EV_VEC_velocity, velocity)                     if(para_ent[id] > 0)                     {                         if(entity_get_float(para_ent[id], EV_FL_frame) < 0.0 || entity_get_float(para_ent[id], EV_FL_frame) > 254)                         {                             if(entity_get_int(para_ent[id], EV_INT_sequence) == 0)                             {                                 entity_set_int(para_ent[id], EV_INT_sequence, 1)                             }                             entity_set_float(para_ent[id], EV_FL_frame, 0.0)                         }                         else                         {                             entity_set_float(para_ent[id], EV_FL_frame, entity_get_float(para_ent[id], EV_FL_frame) + 1.0)                         }                         new Float:origin[3]                         entity_get_vector(id, EV_VEC_origin, origin)                         origin[2] -= 46.0                         entity_set_vector(para_ent[id], EV_VEC_origin, origin)                     }                 }                 else                 {                     if(para_ent[id] > 0)                     {                         remove_entity(para_ent[id])                         para_ent[id] = 0                     }                 }             }             else             {                 if(para_ent[id] > 0)                 {                     remove_entity(para_ent[id])                     para_ent[id] = 0                 }             }         }         else         {             if(para_ent[id] > 0)             {                 remove_entity(para_ent[id])                 para_ent[id] = 0             }         }     }         return PLUGIN_CONTINUE }
and help me here http://forums.alliedmods.net/showthread.php?t=11408
__________________
- Bye bye!
nightscreem is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-22-2005 , 16:58  
Reply With Quote #2

client_prethink is now client_PreThink.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 03-22-2005 , 17:28  
Reply With Quote #3

thx you own man
__________________
- Bye bye!
nightscreem is offline
|2eM!x
Member
Join Date: Mar 2005
Old 03-22-2005 , 21:42  
Reply With Quote #4

caps locks matter in this dang thing?
|2eM!x is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-22-2005 , 21:46  
Reply With Quote #5

Quote:
Originally Posted by |2eM!x
caps locks matter in this dang thing?
Yea, I guess it's cAsE-sEnSiTiVe.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-22-2005 , 22:45  
Reply With Quote #6

I probably would've have even noticed it if someone hadn't already told you why in the topic for the plugin itself. Go thank him, not me.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 04-08-2005 , 07:17  
Reply With Quote #7

ok but how can i change it that if you die you have to buy a new one
__________________
- Bye bye!
nightscreem is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 04-08-2005 , 11:14  
Reply With Quote #8

if_is_user_alive and has_parachute[id]=false
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
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 09:52.


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