Raised This Month: $23 Target: $400
 5% 

[TUT] Fakemeta General Usage


Post New Thread Reply   
 
Thread Tools Display Modes
pope
Junior Member
Join Date: Nov 2005
Location: New York
Old 12-15-2006 , 22:14   Re: Fakemeta General Usage
Reply With Quote #21

In order to do it with FakeMeta you'd have to forward FM_ClientUserInfoChanged and FM_PlayerPostThink, and check in both for changes to the clients model string using get_user_info, and assuming it doesn't match your custom, change it with set_user_info.

Though, quite frankly, it'd be alot simpler just to use cs_set_user_model like Hawk said.
__________________
pope is offline
Send a message via AIM to pope Send a message via MSN to pope Send a message via Yahoo to pope
stupok
Veteran Member
Join Date: Feb 2006
Old 12-22-2006 , 20:45   Re: Fakemeta General Usage
Reply With Quote #22

I'm just wondering, lets say I do this:

Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {     register_plugin("Client Command", "0.1", "stupok69")         register_forward(FM_ClientCommand, "cc_function") } public cc_function() {     client_print(0, print_chat, "COMMAND EXECUTED!") }

How am I supposed to know what should go in the parentheses in "cc_function()"? This list doesn't help.

Somehow you knew that the handling function should contain id and const model below, so there must be some documentation. You didn't mention it though, so I'm wondering where to find it.

Code:
register_forward(FM_SetModel,"HandlingFunction"); public HandlingFunction(id,const model[]) { // id is the entity being set to this model // const model[] is the model it's being set to // return FMRES_SUPERCEDE to cancel it // return FMRES_IGNORED to let it go through }

Also, the links you (Hawk552) provide in this paragraph require a login username and password.
Quote:
It is easy to read entvars in FakeMeta, however it can sometimes cause problems if not done correctly (which is why Engine is more commonly used). Entvars are variables in a player's edict structure (an edict is the basis for an entity).

Last edited by stupok; 12-22-2006 at 20:47.
stupok is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-22-2006 , 21:02   Re: Fakemeta General Usage
Reply With Quote #23

You have to log in because they don't exist, so it defaults to edit mode.

You can take a look at this page:
http://svn.tcwonline.org/viewvc.cgi/...dx&view=markup

It'll tell you what most of the forwards pass for data. The prototype for it will generally contain what data type each parameter is, since they're casted to cell when actually thrown out (char = string, int = cell [i.e. no tag, single variable], etc.)
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
The Specialist
BANNED
Join Date: Nov 2006
Old 12-23-2006 , 04:03   Re: Fakemeta General Usage
Reply With Quote #24

I have a question about using fakemeta natives to precache. What is the differance between
Code:
precache_model("whatever");   &&   engfunc(EngFunc_PrecacheModel,"whatever");
The Specialist is offline
Send a message via AIM to The Specialist
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 12-23-2006 , 06:46   Re: Fakemeta General Usage
Reply With Quote #25

Your bottom version won't work that is the difference

Here is the correct way, this is applicable to PrecacheSound & PrecacheGeneric:
Code:
engfunc(EngFunc_PrecacheModel, engfunc(EngFunc_AllocString, "whatever"))
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-23-2006 , 07:05   Re: Fakemeta General Usage
Reply With Quote #26

really? So my other question , what the difereance between them . And also , is it ok to precahce them from the public plugin_init() ?
The Specialist is offline
Send a message via AIM to The Specialist
pope
Junior Member
Join Date: Nov 2005
Location: New York
Old 12-23-2006 , 07:44   Re: Fakemeta General Usage
Reply With Quote #27

Quote:
Originally Posted by The Specialist View Post
really? So my other question , what the difereance between them . And also , is it ok to precahce them from the public plugin_init() ?
There isn't any difference afaik, just one is core and the other is fakemeta...

As for your other question, try it and see I guess, but the docs say to do it in plugin_precache since it's the first forward:

plugin_precache
Core (amxmodx.inc)
Description
plugin_precache - Actually first called forward
Syntax
plugin_precache ( )
Type
Forward
Notes
You should do all precaching here, as it is called on ServerActivate.
__________________
pope is offline
Send a message via AIM to pope Send a message via MSN to pope Send a message via Yahoo to pope
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-23-2006 , 08:11   Re: Fakemeta General Usage
Reply With Quote #28

the AllocString stuff is done by the module
engfunc(EngFunc_PrecacheModel,"whatever"); is ok
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 12-23-2006 , 08:55   Re: Fakemeta General Usage
Reply With Quote #29

Quote:
Originally Posted by jim_yang View Post
the AllocString stuff is done by the module
engfunc(EngFunc_PrecacheModel,"whatever"); is ok
yeah I was gonna say , I thought I used that before and it worked.
The Specialist is offline
Send a message via AIM to The Specialist
Zenith77
Veteran Member
Join Date: Aug 2005
Old 12-23-2006 , 11:45   Re: Fakemeta General Usage
Reply With Quote #30

plugin_precache() is called before plugin_init(). If you were to precache in there, you would most likely crash the server.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 21:31.


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