Raised This Month: $ Target: $400
 0% 

[ Solved ] Ham_Spawn -> fakemeta


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-13-2008 , 16:00   [ Solved ] Ham_Spawn -> fakemeta
Reply With Quote #1

how to ??

hamsandwich:
PHP Code:
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1); 
fakemeta ??
__________________

Last edited by xPaw; 08-26-2008 at 09:03.
xPaw is offline
butthead
Member
Join Date: May 2007
Location: Nitra, Slovakia
Old 08-13-2008 , 16:06   Re: Ham_Spawn -> fakemeta
Reply With Quote #2

register_forward(FM_Spawn, "fwHamPlayerSpawnPost")
__________________
butthead is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-13-2008 , 16:51   Re: Ham_Spawn -> fakemeta
Reply With Quote #3

FM_Spawn wont work, use this tut : http://forums.alliedmods.net/showthread.php?t=42159
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-13-2008 , 17:26   Re: Ham_Spawn -> fakemeta
Reply With Quote #4

Quote:
Originally Posted by connorr View Post
FM_Spawn wont work, use this tut : http://forums.alliedmods.net/showthread.php?t=42159
Or just stick with HamSandwich, it's much better and more reliable than any other method.
danielkza is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 08-14-2008 , 06:46   Re: Ham_Spawn -> fakemeta
Reply With Quote #5

Quote:
Originally Posted by danielkza View Post
Or just stick with HamSandwich, it's much better and more reliable than any other method.
the problem is the online compiler doesnt support hamsandwich .
And its always easyer if you dont have to compile it local
__________________
I am out of order!
grimvh2 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-14-2008 , 06:56   Re: Ham_Spawn -> fakemeta
Reply With Quote #6

compile locally is so easy...

This web compiler support ham : http://webcomp.ak-team.com/index.php
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 08-15-2008 , 12:05   Re: Ham_Spawn -> fakemeta
Reply With Quote #7

I know that its easy :/ ... but other people still dont know how
__________________
I am out of order!
grimvh2 is offline
zwfgdlc
Senior Member
Join Date: May 2006
Old 08-15-2008 , 16:20   Re: Ham_Spawn -> fakemeta
Reply With Quote #8

try this.
Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> #define PLUGIN_NAME "fm_player_spawn" #define PLUGIN_VERSION  "1.0" #define PLUGIN_AUTHOR   "zwfgdlc" #define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1)) new gMsgRestHud; public plugin_init() {     register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);     gMsgRestHud=get_user_msgid("ResetHUD");     register_forward(FM_MessageBegin,"fw_messgaebegin"); } public fw_messgaebegin(msg_dest,msgid,Float:origin[3],id) {     if(msg_dest==MSG_ONE&&msgid==gMsgRestHud&&is_user_alive(id))     {         server_print("spawn a player!!!!!!");         fm_give_item(id,"weapon_awp");         fm_give_item(id,"ammo_338magnum");         fm_give_item(id,"ammo_338magnum");         fm_give_item(id,"ammo_338magnum");     }         } stock fm_give_item(index, const item[]) {     if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5) && !equal(item, "tf_weapon_", 10))         return 0     new ent = fm_create_entity(item)     if (!pev_valid(ent))         return 0     new Float:origin[3]     pev(index, pev_origin, origin)     set_pev(ent, pev_origin, origin)     set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN)     dllfunc(DLLFunc_Spawn, ent)     new save = pev(ent, pev_solid)     dllfunc(DLLFunc_Touch, ent, index)     if (pev(ent, pev_solid) != save)         return ent     engfunc(EngFunc_RemoveEntity, ent)     return -1 }
zwfgdlc is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-15-2008 , 16:36   Re: Ham_Spawn -> fakemeta
Reply With Quote #9

I don't see the point using MessageBegin here. As far I understand, it's exactly the same using ResetHud event ( register_event() ) and with as check "if ( id && is_user_alive( id ) )", except your code will probably called very often. So, I think it's pointless and overhead to do that.
__________________

Last edited by Arkshine; 08-15-2008 at 16:59.
Arkshine is offline
Old 08-15-2008, 16:38
Lee
This message has been deleted by Lee. Reason: I can't resist flamebait.
zwfgdlc
Senior Member
Join Date: May 2006
Old 08-15-2008 , 23:14   Re: Ham_Spawn -> fakemeta
Reply With Quote #10

Quote:
Originally Posted by arkshine View Post
I don't see the point using MessageBegin here. As far I understand, it's exactly the same using ResetHud event ( register_event() ) and with as check "if ( id && is_user_alive( id ) )", except your code will probably called very often. So, I think it's pointless and overhead to do that.
You are right. Method that but seemed without others.
zwfgdlc 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 03:16.


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