1st question,
I'm trying to put it as spawning any monster(from monster_babycrab to monster_nihilanth, of course I wouldn't use nihilanth because... the server will crash) in sven coop, rather than using Engine to recreate them(create_entity). Since I don't think there is a command to spawn monsters in sven coop, would I just do create_entity "monster_barney"?
2nd question,
I'm trying to have 1 player heal other players within a 200 radius, and finding the players must have worked, but how would I use set_user_health? I've done it like this:
PHP Code:
new playergroup
new entlist[513];
playergroup=find_sphere_class(0,"player",200.0,entlist,512);
new playerheal=get_user_health(id)+(speed[id]/2)
set_user_health(playergroup,playerheal+25)
client_print(id,print_chat,"[HKXP]Healed players around you for %i.",playerheal)
3rd question,
*FIXED*
This one is fine, but I want it to tell the *correct* time, because it gives me a huge number like 1237469900 when it is really 6 or 7. I've written it like this:
PHP Code:
set_user_godmode(id, 1)
set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
new tonegtime=2.0+(speed[id]/2)
set_task(tonegtime,"ToneGod",id)
client_print(id,print_chat,"[HKXP]Short Godmode On for %i.",tonegtime)
How could I fix that?
4th question,
I'm having a skill cooldown timer but I don't believe its working. I've written it like this:
PHP Code:
public skillcooldown(id)
{
if(skillwait[id]>0)
{
skillwait[id]=skillwait[id]-1
}
}
//Later on in another function..
set_task(1.0,"skillcooldown",60)
I'm getting Index Out Of Bounds on if(skillwait[id]>0). How do I fix this?
__________________
I can't believe I wasted 5 years of my life not knowing how to program correctly. Went too deep into advanced coding before even learning the basics correctly. :c