AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]godmode (https://forums.alliedmods.net/showthread.php?t=94988)

One 06-18-2009 03:10

[SOLVED]godmode
 
PHP Code:

public fwHamPlayerSpawnPostid 
{
    
set_user_godmode(id,1)
    new 
map_version[7]
    
get_mapname(map_version,6)
    if(
equali(map_version,"def_"4))
    {
        
set_task(GIVING_AN_SCOUT"giving_scout"id);
    }


PHP Code:

L 06/18/2009 09:06:37: [FUNInvalid player 1
L 06
/18/2009 09:06:37: [AMXXDisplaying debug trace (plugin "Untitled.amxx")
L 06/18/2009 09:06:37: [AMXXRun time error 10native error (native "set_user_godmode")
L 06/18/2009 09:06:37: [AMXX]    [0Untitled.sma::fwHamPlayerSpawnPost (line 199


kielor 06-18-2009 03:21

Re: godmode
 
try set_pev(id, pev_takedamage, 0.0) instead of set_user_godmode(id, 1)

Arkshine 06-18-2009 03:23

Re: godmode
 
set_user_godmode() is fine.

@One : you forget to add a check before if user is alive or not.

One 06-18-2009 03:27

Re: godmode
 
ty ty.

i tried with takeamage 0 but didnt work :P so i thinked i give god mod & good is.

so now which should i use? what u mean? godmode or takedmg 0?

Arkshine 06-18-2009 04:06

Re: godmode
 
set_user_godmode() is fine. All you have to do is to add before all a check using is_user_alive().

One 06-18-2009 04:33

Re: [SOLVED]godmode
 
ok then godemod :D ty


All times are GMT -4. The time now is 15:36.

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