Raised This Month: $ Target: $400
 0% 

It kill player...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
elpouletorange
Senior Member
Join Date: Oct 2007
Old 10-23-2007 , 21:33   It kill player...
Reply With Quote #1

When this plugin is activated it kill player at spawning ... I don't think its the gravity because my server have No Fall Damage

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define MENU_KEYS MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
#define PLUGIN "Kill mod"
#define VERSION "1.0"
#define AUTHOR "elpouletorange"
#define MAX_PLAYERS 32

new bool:g_restart_attempt[MAX_PLAYERS 1]
new 
str[33]
new 
def[33]
new 
dex[33]
new 
agi[33]
new 
total[33]
new 
skp[33]

public 
plugin_init() 
{
 
register_clcmd("say /menu""kmod_menu")
 
register_menucmd(register_menuid("Select your skills"), MENU_KEYS"choixMenu");
 
register_event("ResetHUD""event_hud_reset""be")
 
register_clcmd("fullupdate""clcmd_fullupdate"
 
register_event("TextMsg""event_restart_attempt""a""2=#Game_will_restart_in")
}
public 
kmod_menu(id

 
skp[id] = get_user_frags(id);
 
total[id] = skp[id] - str[id] - def[id] - dex[id] - agi[id];
 
 if (
total[id] != 0)
 {
  new 
menutext[192]; 
  
format(menutext191"Select your skills^n^n1. Strenght (More Heal)^n2. Defence (More armor)^n3. Dexterity (Low gravity)^n4. Agility (More speed)"); 
  
show_menu(idMENU_KEYSmenutext); 
 }
 else
 {
  
client_print(idprint_chat"You cant choose a skill you got 0skp");
 }
}
public 
choixMenu(idkey)
{
 switch(
key)
 {
  case 
0:
   
str[id] = str[id] + 1;
  case 
1:
   
def[id] = def[id] + 1;
  case 
2:
   
dex[id] = dex[id] + 1;
  case 
3:
   
agi[id] = agi[id] + 1;
 }
}
public 
clcmd_fullupdate() {
    return 
PLUGIN_HANDLED_MAIN
}
 
public 
event_restart_attempt() {
    new 
players[32], num
    get_players
(playersnum"a")
    for (new 
inum; ++i)
        
g_restart_attempt[players[i]] = true
}
 
public 
event_hud_reset(id) {
    if (
g_restart_attempt[id]) {
        
g_restart_attempt[id] = false
        
return
    }
    
event_player_spawn(id)
}
 
public 
event_player_spawn(id) {
    
set_user_health(idstr[id] * 5)
    
set_user_armor(iddef[id] * 10)
    
set_user_gravity(iddex[id] * 0.005)
    
cs_set_user_money(idcs_get_user_money(id) + agi[id] * 50)

elpouletorange is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 10-23-2007 , 23:04   Re: It kill player...
Reply With Quote #2

try to set str[id]=1 , they might be killed because at start the health is 0
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow 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 01:22.


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