Raised This Month: $ Target: $400
 0% 

[ Solved ] Ham_Spawn -> fakemeta


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
zwfgdlc
Senior Member
Join Date: May 2006
Old 08-15-2008 , 16:20   Re: Ham_Spawn -> fakemeta
Reply With Quote #6

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
 



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