AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with a plugin (https://forums.alliedmods.net/showthread.php?t=135885)

topline 08-20-2010 14:56

Help with a plugin
 
Guys what does this all mean??

Code:

static Float:lastTouched[33];

GetObjectProperty(ent, 1, szProperty1);
GetObjectProperty(ent, 2, szProperty2);
new Float:fHeal = str_to_float(szProperty1);
new Float:fInterval = str_to_float(szProperty2);

if ( get_gametime() - lastTouched[plr] > fInterval )
{
new Float:health;
pev(plr, pev_health, health);
if ( health + fHeal < 100.0 )
{
set_pev(plr, pev_health, health + fHeal);
}
else
{
set_pev(plr, pev_health, 100.0);
}

lastTouched[plr] = get_gametime();
}
}


Rhyme 08-20-2010 16:07

Re: Help with a plugin
 
respawn player with 100 hp on gametime

fysiks 08-20-2010 21:13

Re: Help with a plugin
 
It doesn't mean anyting as you have it posted there. You have to show the whole code. (if it's really big then attach the .sma).


All times are GMT -4. The time now is 21:58.

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