Raised This Month: $ Target: $400
 0% 

Checks fail all the time?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 05-05-2010 , 11:42   Re: Checks fail all the time?
Reply With Quote #1

To show you better:

PHP Code:
public plugin_init()
{
    
// Plugin Info
    
register_plugin("SUPERHERO Superman"SH_VERSION_STR"{HOJ} Batman")

    
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
    
new pcvarLevel register_cvar("superman_level""0")
    new 
pcvarArmor register_cvar("superman_armor""150")
    new 
pcvarHealth register_cvar("superman_health""150")
    new 
pcvarGravity register_cvar("superman_gravity""0.35")

    
// FIRE THE EVENT TO CREATE THIS SUPERHERO!
    
new heroID sh_create_hero("Superman"pcvarLevel)
    
sh_set_hero_info(heroID"Health/Armor/Gravity""More Health, Free Armor, and Reduced Gravity")
    
sh_set_hero_hpap(heroIDpcvarHealthpcvarArmor)
    
sh_set_hero_grav(heroIDpcvarGravity)

This is how it is working, and as you see, it is done the way I do. Its just that I want to add a check if the user is a zombie or not, before adding the hero powers. With this, it adds the hero power just about 1 second after spawn.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-05-2010 , 18:22   Re: Checks fail all the time?
Reply With Quote #2

Can more than one person be the same hero? If the answer is yes then checking the "qualifications" of one player to set the attributes for all players that are that type of hero is illogical.
__________________
fysiks is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 05-06-2010 , 19:49   Re: Checks fail all the time?
Reply With Quote #3

More than one client can have the hero yes. But I think it is checked in the SH core plugin, to make it easier and faster to code a hero.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-06-2010 , 20:54   Re: Checks fail all the time?
Reply With Quote #4

Quote:
Originally Posted by Jelle View Post
More than one client can have the hero yes. But I think it is checked in the SH core plugin, to make it easier and faster to code a hero.
Ok, so what I'm saying is why would you set the attributes of a whole "class" based on ONE person?? This makes no sense.
__________________
fysiks is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 05-07-2010 , 05:00   Re: Checks fail all the time?
Reply With Quote #5

Because, I have installed ZP and SH on a server, and now I would like each hero to not set Super Hero powers on any zombie.

So, when you pick the hero, or when you spawn and have the hero, it should check if the guy is a zombie or not before setting the HP/AP. Is that even possible?
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-07-2010 , 17:48   Re: Checks fail all the time?
Reply With Quote #6

Quote:
Originally Posted by Jelle View Post
So, when you pick the hero, or when you spawn and have the hero, it should check if the guy is a zombie or not before setting the HP/AP. Is that even possible?
Ok, so what you are saying is that the HP/AP is set only when someone spawns. And, you only want this to apply only to humans.

Ok, so how do you become a hero? Is there a command? If yes, you can just disable the command for non-humans.

If no, and you need to do what you are trying to do then I think there might be issues with the timing of becoming a zombie or becoming a hero after you spawn.
__________________
fysiks is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 05-07-2010 , 17:59   Re: Checks fail all the time?
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
Ok, so what you are saying is that the HP/AP is set only when someone spawns. And, you only want this to apply only to humans.

Ok, so how do you become a hero? Is there a command? If yes, you can just disable the command for non-humans.

If no, and you need to do what you are trying to do then I think there might be issues with the timing of becoming a zombie or becoming a hero after you spawn.
You pick the hero via a menu, and then it is saved that you have it, and you have it until you drop it again.

I also thought there was an issue by that, which is why I tried setting a task, so the HP/AP would be set 15 seconds after a player has spawned. I am not planning on having any respawn heroes on it, so players only spawn when a new round is starting.

Question:
Does a player which survives a round, spawn when the next round starts, or is he just teleported?
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-07-2010 , 18:41   Re: Checks fail all the time?
Reply With Quote #8

Quote:
Originally Posted by Jelle View Post
Question:
Does a player which survives a round, spawn when the next round starts, or is he just teleported?
I'm pretty sure they spawn. (hookable with HAM) Afterall, all the attributes are reset, health, armor, etc.
__________________
fysiks is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 05-07-2010 , 06:05   Re: Checks fail all the time?
Reply With Quote #9

Use cs_teams instead if one team are zombies and the other team are superheroes? Just a thought. Would be really cool if you can fix it!
__________________
The Art of War is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 05-07-2010 , 11:26   Re: Checks fail all the time?
Reply With Quote #10

I tested it. Zombies can be on both T and CT teams, so no luck with that.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:36.


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