Raised This Month: $ Target: $400
 0% 

Entity not wanting to get spawned


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpliN
Junior Member
Join Date: Jun 2020
Location: Egypt
Old 10-10-2021 , 09:27   Entity not wanting to get spawned
Reply With Quote #1

Hello i have a plugin that spawns a jetpack in random place in the map every round start
I used rog.inc so please check if this code is right

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <colotchat>
#include <rog>

public plugin_init()
{
register_plugin ("Jetpack Random Spawns","2.0b","SpliN");
ROGInitialize(250.0);
register_logevent("RoundStart",2,"1=Round_Start");
}

public 
RoundStart(iPlayer)
{
new 
Float:Origin[3];
new 
g_ent engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"Jetpack"));
set_pevg_entpev_renderfxkRenderFxGlowShell );
set_pevg_entpev_renderamt125.0 );
set_pevg_entpev_rendermodekRenderTransAlpha );
set_pevg_entpev_rendercolor, {0.0255.00.0} );
ROGGetOrigin(Origin);
engfunc(EngFunc_SetOrigin,g_ent,Origin);
ColorChat(0,NORMAL,"[^x04GIFT^x01] a Jetpack has been Spawned in a random place in the map , Go get it !");

__________________
Selling Original Zombie Plague 6.2 amxx + module(.so) Contact Me For Purchuase
<a href="https://www.gametracker.com/server_info/89.41.176.19:27015/" target="_blank"><img src="https://cache.gametracker.com/server_info/89.41.176.19:27015/b_560_95_1.png" border="0" width="560" height="95" alt=""/></a>
SpliN is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-10-2021 , 11:23   Re: Entity not wanting to get spawned
Reply With Quote #2

#include <colotchat> ?
Post the rog.inc in your OP please.
__________________
DJEarthQuake is offline
SpliN
Junior Member
Join Date: Jun 2020
Location: Egypt
Old 10-10-2021 , 12:26   Re: Entity not wanting to get spawned
Reply With Quote #3

Quote:
Originally Posted by DJEarthQuake View Post
#include <colotchat> ?
Post the rog.inc in your OP please.
I used this
https://forums.alliedmods.net/showthread.php?t=309495
__________________
Selling Original Zombie Plague 6.2 amxx + module(.so) Contact Me For Purchuase
<a href="https://www.gametracker.com/server_info/89.41.176.19:27015/" target="_blank"><img src="https://cache.gametracker.com/server_info/89.41.176.19:27015/b_560_95_1.png" border="0" width="560" height="95" alt=""/></a>
SpliN is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-10-2021 , 13:26   Re: Entity not wanting to get spawned
Reply With Quote #4

There is no such entity is Jetpack either try to replace it with info_target or something else and then change its class name.
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-10-2021 , 14:09   Re: Entity not wanting to get spawned
Reply With Quote #5

Do what Natsheh said. Also you may want to give it a model.
__________________
HamletEagle is offline
SpliN
Junior Member
Join Date: Jun 2020
Location: Egypt
Old 10-10-2021 , 16:28   Re: Entity not wanting to get spawned
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
There is no such entity is Jetpack either try to replace it with info_target or something else and then change its class name.
So the code has no error except invalid classname
Because the addons which i am using has a modul and i got this classname from the module
__________________
Selling Original Zombie Plague 6.2 amxx + module(.so) Contact Me For Purchuase
<a href="https://www.gametracker.com/server_info/89.41.176.19:27015/" target="_blank"><img src="https://cache.gametracker.com/server_info/89.41.176.19:27015/b_560_95_1.png" border="0" width="560" height="95" alt=""/></a>
SpliN is offline
SpliN
Junior Member
Join Date: Jun 2020
Location: Egypt
Old 10-11-2021 , 09:48   Re: Entity not wanting to get spawned
Reply With Quote #7

I did that and still not working
__________________
Selling Original Zombie Plague 6.2 amxx + module(.so) Contact Me For Purchuase
<a href="https://www.gametracker.com/server_info/89.41.176.19:27015/" target="_blank"><img src="https://cache.gametracker.com/server_info/89.41.176.19:27015/b_560_95_1.png" border="0" width="560" height="95" alt=""/></a>
SpliN is offline
SpliN
Junior Member
Join Date: Jun 2020
Location: Egypt
Old 10-11-2021 , 09:48   Re: Entity not wanting to get spawned
Reply With Quote #8

#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <colotchat>
#include <rog>

public plugin_precache()
{

}

public plugin_init()
{
register_plugin ("Jetpack Random Spawns","2.0b","SpliN");
ROGInitialize(250.0);
register_logevent("RoundStart",2,"1=Round_Sta rt");
}

public RoundStart(iPlayer)
{
new Float:Origin[3];
new g_ent = engfunc(EngFunc_CreateNamedEntity,engfunc(Eng Func_AllocString,"info_target"));
ROGGetOrigin(Origin)
if(pev_valid(g_ent))
{
set_pev(g_ent,pev_classname,"Jetpack")
set_pev( g_ent, pev_renderfx, kRenderFxGlowShell );
set_pev( g_ent, pev_renderamt, 125.0 );
set_pev( g_ent, pev_rendermode, kRenderTransAlpha );
set_pev( g_ent, pev_rendercolor, {0.0, 255.0, 0.0} );
engfunc(EngFunc_SetOrigin,g_ent, Origin);
}
ColorChat(0,NORMAL,"[^x04NewLifeZM^x01] a Jetpack has been Spawned in a random place in the map , Go get it !");
}
__________________
Selling Original Zombie Plague 6.2 amxx + module(.so) Contact Me For Purchuase
<a href="https://www.gametracker.com/server_info/89.41.176.19:27015/" target="_blank"><img src="https://cache.gametracker.com/server_info/89.41.176.19:27015/b_560_95_1.png" border="0" width="560" height="95" alt=""/></a>
SpliN is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-11-2021 , 12:26   Re: Entity not wanting to get spawned
Reply With Quote #9

Define "not working". As I said before, you may want to give your jetpack a model just to confirm it is actually being spawned.
__________________
HamletEagle is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 10-12-2021 , 01:58   Re: Entity not wanting to get spawned
Reply With Quote #10

Don't you need to set a size or am i wrong?

Last edited by AnimalMonster; 10-12-2021 at 01:59.
AnimalMonster is offline
Reply


Thread Tools
Display Modes

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 10:23.


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