AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Always? (https://forums.alliedmods.net/showthread.php?t=162000)

RuleBreaker 07-13-2011 18:02

Always?
 
How to make something that`ll be always...for example that plugin will slay you if you have lower than 50hp....so it needs to check you all the time :)

Doc-Holiday 07-13-2011 18:05

Re: Always?
 
you can have it check on takedamage if the players health is less then 50 then slay

RuleBreaker 07-13-2011 18:07

Re: Always?
 
But how? I know how to make it with command....

Doc-Holiday 07-13-2011 18:08

Re: Always?
 
Quote:

Originally Posted by RuleBreaker (Post 1510114)
But how? I know how to make it with command....

search for it.

Ham_TakeDamage

RuleBreaker 07-13-2011 18:13

Re: Always?
 
That was just example...i want to learn how to:
slay someine when he has lower than 50dmg
kick someone when he has ak47
....
it was just example

Doc-Holiday 07-13-2011 18:38

Re: Always?
 
i dont understand what your talking about

fysiks 07-14-2011 00:07

Re: Always?
 
Quote:

Originally Posted by RuleBreaker (Post 1510118)
That was just example...i want to learn how to:
slay someine when he has lower than 50dmg
kick someone when he has ak47
....
it was just example

The answer is dependent on what you are doing. There is no magical code to do everything.

RuleBreaker 07-14-2011 03:50

Re: Always?
 
Ok, I want to check how many ammo someone has and then to do something to him.

Erox902 07-14-2011 13:57

Re: Always?
 
PHP Code:

native cs_get_weapon_ammo(index); 

PHP Code:

native cs_get_user_bpammo(indexweapon); 

like:
PHP Code:

if( cs_get_weapon_ammo >= 30 )
{
    
//do something to him 


RuleBreaker 07-14-2011 16:01

Re: Always?
 
but what function? I know how to make it with command...should I use some event or what?


All times are GMT -4. The time now is 00:52.

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