AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Godmode for X seconds (https://forums.alliedmods.net/showthread.php?t=2127)

sanaell 05-27-2004 07:45

Godmode for X seconds
 
i want give 5s of godmode for antispawn protection

How i can do that....

set_user_godmode don t exist....
[/code]

xeroblood 05-27-2004 12:10

from fun.inc:

Code:
/* Sets player godmode. If you want to disable godmode set only first parameter. */ native set_user_godmode(index, godmode = 0);


So, maybe you need to include fun module into your code??

Ex:
#include <fun>

Girthesniper 05-27-2004 16:12

POST THAT PLUGIN! THATS AN AWSOME IDEA!

QwertyAccess 05-27-2004 19:49

amx_slap gir,
Use the search tool.

Peli 05-27-2004 19:58

Re: Godmode for X seconds
 
Quote:

Originally Posted by sanaell
i want give 5s of godmode for antispawn protection

How i can do that....

You want to make an anti-spawnprotection plugin or a spawnprotection plugin? :? Well anyways , try looking at the code from the spawnprotection plugin I made. Or just try working with what you wanted. :
Code:
set_task("5.0","function") //Sets god off in 5 seconds, but you have to put a function... set_user_godmode(id,0/1) //God on or off but you have to put an id...
Good luck.

sanaell 05-28-2004 11:59

Re: Godmode for X seconds
 
Quote:

Originally Posted by Peli
Quote:

Originally Posted by sanaell
i want give 5s of godmode for antispawn protection

How i can do that....

You want to make an anti-spawnprotection plugin or a spawnprotection plugin? :? Well anyways , try looking at the code from the spawnprotection plugin I made. Or just try working with what you wanted. :
Code:
set_task("5.0","function") //Sets god off in 5 seconds, but you have to put a function... set_user_godmode(id,0/1) //God on or off but you have to put an id...
Good luck.

how ?

can we get the man who attack and the one who was attacked ?

in that
Code:
public plugin_init() {     register_plugin("Anti Respawn","0.1.2","MeOw")     register_cvar("anti_respawn_time","5.0")     server_cmd("exec addons/cfg_plug/anti_respawn/anti_respawn.cfg")     new mapname[33]     get_mapname(mapname,32)     if(equali(mapname,"aaa_",4) || equali(mapname,"aim_",4) || equali(mapname,"awp_",4) || equali(mapname,"scoutzknivez",5) || equali(mapname,"duel_",5) || equali(mapname,"fy_",3) ) {         register_event("RoundTime", "Round_Time", "bc") //i want get the one who was attacked here and give him temp god mode but it must be in damage_msg function         register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")     }     return PLUGIN_CONTINUE }


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

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