AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [REQ] Auto Godmode (https://forums.alliedmods.net/showthread.php?t=64879)

AcidoX 12-26-2007 16:12

[REQ] Auto Godmode
 
Hi, i have a KZ server, and need when player join server gives him godmode, but cant find it...
Help pls, thank you.

AcidoX 12-26-2007 21:33

Re: [REQ] Auto Godmode
 
Sorry, wrong posted :) Anyway alittle fix
Code:

register_event("ResetHUD","spawned","be")
}
public spawned(id)
{
set_task(1.0,"god",id)
}
public god(id)
{
set_user_godmode(id, 1)
}


M249-M4A1 12-26-2007 21:51

Re: [REQ] Auto Godmode
 
Quote:

Originally Posted by AcidoX (Post 567162)
Sorry, wrong posted :) Anyway alittle fix
Code:

register_event("ResetHUD","spawned","be")
}
public spawned(id)
{
set_task(1.0,"god",id)
}
public god(id)
{
set_user_godmode(id, 1)
}


What's the fix?

Alka 12-27-2007 03:37

Re: [REQ] Auto Godmode
 
Ewww, ident the code a bit ?! and also you use fun module ?!

Code:

#include <amxmodx>
#include <fakemeta>
 
#define PLUGIN "GodMode"
#define VERSION "1.0"
#define AUTHOR "Alka"

public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR);
 
 register_event("ResetHUD", "EventSpawn", "be")
}
 
public EventSpawn(id)
 set_task(0.2, "cmdSetGodmode", id + 1337);
 
public cmdSetGodmode(id)
{
 id -= 1337;
 
 if(is_user_connected(id))
  set_pev(id, pev_takedamage, DAMAGE_NO);
}



All times are GMT -4. The time now is 11:07.

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