[Maps ] Spawn Bosses
There are 3 Bosses ( loading all 3 plugins on the NPC Mod )
I do spawn on the map in precache in each plugin like this boss_alien PHP Code:
PHP Code:
PHP Code:
Tell me, what other way is there for only one Boss to work on a specific map ( 1 plugin ) |
Re: [Maps ] Spawn Bosses
When do you want to spawn bosses, on each player spawn?
|
Re: [Maps ] Spawn Bosses
I didn't really get enough info, but this might be what you want:
PHP Code:
PHP Code:
|
Re: [Maps ] Spawn Bosses
That's happening because you're checking if the value returned by the function "equal" is not -1. It will always be true since "equal" returns true (1) or false (0). To fix that just switch != -1 for != 0
For more info on "equal" function check this |
Re: [Maps ] Spawn Bosses
Quote:
|
Re: [Maps ] Spawn Bosses
Quote:
|
Re: [Maps ] Spawn Bosses
@MayroN
how did you hook maps name? I don't see maps with those names (Alien, Revenant ...) Show us the function code or full code to make it easier to find out the problem |
Re: [Maps ] Spawn Bosses
Quote:
|
Re: [Maps ] Spawn Bosses
Quote:
if(g_mapname) is wrong because g_mapname is an array, you probably meant g_mapname[0](to check if the string is not empty). switch(g_mapname) switch cannot be used on strings. case Alien: Alien is not a string, "Alien" is(unless you defined somewhere new Allien[] = "Alien", which you probably did not, and if you did you should have posted this in your answer). Alien, as you used it in your code, is an unknown symbol and will produce a compilation error. Regardless, the code you posted will not compile because of issues 1 and 2 anyway. A simple test plugin: PHP Code:
Please test your code before posting and trying to help others so you don't end up confusing them instead. |
Re: [Maps ] Spawn Bosses
What are the exact map names? I'm pretty sure that there aren't maps named "Alien", "Revenant" and "Titan"..
Maybe "boss_alien", "boss_revenant" and "boss_titan"?? Also how are you getting the "mapname"? |
| All times are GMT -4. The time now is 16:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.