Raised This Month: $51 Target: $400
 12% 

help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nordy
Senior Member
Join Date: Apr 2006
Location: Latvia
Old 05-27-2006 , 14:13   help
Reply With Quote #1

i realy need help
now these are 3 code;s which i can't get working together with some kind CMD. can some1 help me and make these 3 working with CMD "amx_whatever" (for example).

Code:
public weapon_switch(id) {     {        new Float:maxSpeed = get_cvar_float;        new weaponid = read_data(2)         if(gCurrentWeapon[id] != weaponid) {              gCurrentWeapon[id] = weaponid            set_user_maxspeed(id,maxSpeed)         }      } }

Code:
public Task_HealthRegen(id) {      new iHealth = get_user_health(id)     if(iHealth < 100)     {         iHealth += RegenPoints         set_user_health(id, iHealth)         if(get_user_health(id) > 100) {             set_user_health(id, 100)         }     } }

Code:
public Event_Damage(id) {     new iDamage = read_data(2)     new iNewDamage = iDamage * 10 // eg of 2X Damage    set_user_health(id, get_user_health(id) - iNewDamage) // triple damage (original damage + 2X original damage) }
nordy is offline
nordy
Senior Member
Join Date: Apr 2006
Location: Latvia
Old 05-27-2006 , 14:15  
Reply With Quote #2

and.. i wrote this code But speed in this working all the time for all users but i want that the this is working only after command "amx_unstop" and only for me...

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #include <engine> #define PLUGIN "Unstopable" #define VERSION "1.1" #define AUTHOR "Nordy" new gCurrentWeapon[33]    new RegenPoints public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("amx_unstop", "cmd_unstop", ADMIN_IMMUNITY)     register_clcmd("amx_stopme", "cmd_stop", ADMIN_IMMUNITY)     register_event("CurWeapon","weapon_switch","be","1=1")  } public cmd_unstop(id, level, cid) {     if (!cmd_access(id, level, cid, 2))     //Check if they have the required admin to do it.              return PLUGIN_HANDLED                 set_user_footsteps (id, 1)                    //Set Silent footsteps     cs_set_user_armor (id, 700, CsArmorType:2)              //500AP helm&vest armor.     set_user_health(id, 700)                     //Set 500 HP     set_user_gravity (id, 0.25)                     //Set gravity to 200     new Float:speed = get_user_maxspeed(id) + 600.0;     set_user_maxspeed(id , speed);                     //Set maxspeed to fast     set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAdd,0)    //Set Invisible         (get_user_button(id) & IN_ATTACK)     entity_set_vector (id, EV_VEC_punchangle, Float:{0.0, 0.0, 0.0})         return PLUGIN_HANDLED } public cmd_stop(id, level, cid) {     if (!cmd_access(id, level, cid, 2))     //Check if they have the required admin to do it.          return PLUGIN_HANDLED                     set_user_footsteps (id, 0)                     //Set regular footsteps     cs_set_user_armor (id, 100, CsArmorType:2)             // Set regular armor     set_user_health(id, 100)                     // Set regular health     set_user_gravity (id, 1.0)                     //Set 800 gravity     set_user_maxspeed (id, 0.0)                     //Set regular speed     set_user_rendering(id,kRenderFxNone,0,0,0,kRenderNormal,25)     //Set Visible         return PLUGIN_HANDLED } public weapon_switch(id) {     {        new Float:maxSpeed = get_cvar_float;        new weaponid = read_data(2)         if(gCurrentWeapon[id] != weaponid) {              gCurrentWeapon[id] = weaponid            set_user_maxspeed(id,maxSpeed)         }      } } public Task_HealthRegen(id) {      new iHealth = get_user_health(id)     if(iHealth < 100)     {         iHealth += RegenPoints         set_user_health(id, iHealth)         if(get_user_health(id) > 100) {             set_user_health(id, 100)         }     } }  public Event_Damage(id) {     new iDamage = read_data(2)     new iNewDamage = iDamage * 10 // eg of 2X Damage    set_user_health(id, get_user_health(id) - iNewDamage) // triple damage (original damage + 2X original damage) }
nordy is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-27-2006 , 14:28  
Reply With Quote #3

Code:
//... register_cvar("amx_maxspeed","0.1") //... new Float:maxSpeed = get_cvar_float("amx_maxspeed");
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
nordy
Senior Member
Join Date: Apr 2006
Location: Latvia
Old 05-27-2006 , 14:58  
Reply With Quote #4

and how with those regeneration and multiplie damage ??
nordy is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-27-2006 , 15:00  
Reply With Quote #5

Quote:
Originally Posted by nordy
and how with those regeneration and multiplie damage ??
Oh, I thought you were just having compile errors. I don't understand your problem.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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:24.


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