AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity not wanting to get spawned (https://forums.alliedmods.net/showthread.php?t=334640)

SpliN 10-10-2021 09:27

Entity not wanting to get spawned
 
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 !");



DJEarthQuake 10-10-2021 11:23

Re: Entity not wanting to get spawned
 
#include <colotchat> ?
Post the rog.inc in your OP please.

SpliN 10-10-2021 12:26

Re: Entity not wanting to get spawned
 
Quote:

Originally Posted by DJEarthQuake (Post 2760182)
#include <colotchat> ?
Post the rog.inc in your OP please.

I used this
https://forums.alliedmods.net/showthread.php?t=309495

Natsheh 10-10-2021 13:26

Re: Entity not wanting to get spawned
 
There is no such entity is Jetpack either try to replace it with info_target or something else and then change its class name.

HamletEagle 10-10-2021 14:09

Re: Entity not wanting to get spawned
 
Do what Natsheh said. Also you may want to give it a model.

SpliN 10-10-2021 16:28

Re: Entity not wanting to get spawned
 
Quote:

Originally Posted by Natsheh (Post 2760210)
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

SpliN 10-11-2021 09:48

Re: Entity not wanting to get spawned
 
I did that and still not working

SpliN 10-11-2021 09:48

Re: Entity not wanting to get spawned
 
#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 !");
}

HamletEagle 10-11-2021 12:26

Re: Entity not wanting to get spawned
 
Define "not working". As I said before, you may want to give your jetpack a model just to confirm it is actually being spawned.

AnimalMonster 10-12-2021 01:58

Re: Entity not wanting to get spawned
 
Don't you need to set a size or am i wrong?


All times are GMT -4. The time now is 04:37.

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