AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Damage doesn't work (https://forums.alliedmods.net/showthread.php?t=206281)

Spy123 01-20-2013 15:07

Damage doesn't work
 
I have this code:
PHP Code:

public PlayerSpawnedSettings(id){
    if(
IsUserAlive(id)){
        
set_speedchange(id)
        
        
set_pev(idpev_healthfloat(100 + (PlayerUpgrades[id][STA] * AMOUNT_STA))) 
        
        if(
GAME_MODE == MODE_GAME ){
            
set_user_frags(idMadeRecord[id][HUNT] + MadeRecord[id][GOAL] * 10 MadeRecord[id][KILL])
            
cs_set_user_deaths(idg_PlayerDeaths[id])
        }
        else{
            
server_cmd ("sj_huntdist 10000000000000")
            
give_item(id"weapon_awp")
            
give_item(id"weapon_hegrenade")
            
give_item(id"item_kevlar")
            
give_item(id,"ammo_338magnum")
        }
        
        
// prevent bug when transfered from spec or non-team 
        
new sz_clip
        get_user_weapon
(idsz_clip)
        if(!
sz_clip){
            
set_pdata_int(id1215
            
set_task(0.1"User_Spawn"id)
        }
    }


Everything is fine,i get the weapons,but if I shoot an enemy,hp remains 100! What I type in that "else{" ?

Neeeeeeeeeel.- 01-20-2013 15:22

Re: Damage doesn't work
 
Show full code...

Spy123 01-20-2013 16:01

Re: Damage doesn't work
 
This is it... http://www47.zippyshare.com/v/13635146814/file.html

It's a huge code...this is the reason why i didn't put the entire code..

fysiks 01-20-2013 18:13

Re: Damage doesn't work
 
Post it as an attachment to your next post.

Spy123 01-21-2013 01:11

Re: Damage doesn't work
 
ok..let's try..

EDIT: I made it!! Forget this topic :D


All times are GMT -4. The time now is 13:41.

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