Raised This Month: $ Target: $400
 0% 

some fakemeta questions...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KoST
Senior Member
Join Date: Jul 2005
Old 05-01-2006 , 02:08   some fakemeta questions...
Reply With Quote #1

i tried this function:

Code:
public make_ent(){     engfunc(EngFunc_CreateNamedEntity,"beam") }
how to get the ent_id of created entity?
__________________
KoST is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-01-2006 , 02:10  
Reply With Quote #2

I would guess by doing this:
Code:
new ent = engfunc(EngFunc_CreateNamedEntity,"beam")
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
KoST
Senior Member
Join Date: Jul 2005
Old 05-01-2006 , 02:18  
Reply With Quote #3

i did that first; returns always 0...
__________________
KoST is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-01-2006 , 02:44  
Reply With Quote #4

or maybe:
Code:
new ent engfunc(EngFunc_CreateNamedEntity,ent,"beam")
Sorry, I'm a bit of an FM noob myself
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 05-01-2006 , 03:19  
Reply With Quote #5

Well, I had a chat with BAIL, and this is how to create a named entity:

Code:
new classname = engfunc(EngFunc_AllocString, "beam") new beam = engfunc(EngFunc_CreateNamedEntity, classname)

If you noticed, the parameter for creating a named entity, requires an int, not a string for classname. So in order to get an int for classname, you pass in a string in the allocstring function and that'll return the id of the classname. And from there you can create your named entity, using the value you got from AllocString for classname.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-01-2006 , 03:27  
Reply With Quote #6

So I was on the correct path the first time
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 05-01-2006 , 09:29  
Reply With Quote #7

FM is simple. Thats the correct way, but there are other ways.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
KoST
Senior Member
Join Date: Jul 2005
Old 05-01-2006 , 16:05  
Reply With Quote #8

thanks a lot !

i was searching for MakeString instead of AllocString, which doesn't exist..it's so obvious now..

i'm very interested in using FM, can you please give me some hints? where to find info about it? HLSDK? Metamod? AMXX-Source?

[edit]
i would appreciate it if you could send me code examples using FM.
__________________
KoST is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-02-2006 , 13:17  
Reply With Quote #9

Quote:
HLSDK? Metamod? AMXX-Source?
Yes. Yes. Yes.

Quote:
i would appreciate it if you could send me code examples using FM
Just search for the existing plugins which uses FM.
For example my "VIP Alternative", "Fall Scream" and "AFK Bomb Transfer" uses pure FM.
VEN is offline
BAILOPAN
Join Date: Jan 2004
Old 05-02-2006 , 13:51  
Reply With Quote #10

Yup, just a final word on the forums about MAKE_STRING: it's a macro hack to get the engine to recognize static strings as part of the string table (basically).

It's not a function. Small doesn't have static C strings anyway (not in a way AMX Mod X lets you easily have). It's best just to use AllocString and save the string index for next time you're gonna use the same string.
BAILOPAN is offline
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 05:06.


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