Raised This Month: $ Target: $400
 0% 

set_speak in fakemeta...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-27-2006 , 15:01   set_speak in fakemeta...
Reply With Quote #1

Possible?

I'm in the process of finishing up my last batch of plugins that I'm converting over to fakemeta and can't seem to find how to change set_speak.

Any tips?
organizedKaoS is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 10-27-2006 , 15:44   Re: set_speak in fakemeta...
Reply With Quote #2

I havn't tested the plugin yet but pretty much this is what you have to do in your plugin or make a include to use in your plugin or add that code in your plugin.

Code:
#if !defined _engine_included #define SPEAK_NORMAL 0 #define SPEAK_MUTED 1 #define SPEAK_ALL 2 #define SPEAK_LISTENALL 4 /* set/get a user's speak flags */ native set_speak(iIndex, iSpeakFlags); native get_speak(iIndex); #endif

Code:
#include <amxmodx> #include <fakemeta> #define SPEAK_NORMAL 0 #define SPEAK_MUTED 1 #define SPEAK_ALL 2 #define SPEAK_LISTENALL 4 new SpeakFlags[33]; public plugin_init() {     register_plugin("FM SPEAK", "1.0", "Gaben");     if(!LibraryExists("engine", LibType_Library))         register_forward(FM_Voice_SetClientListening, "_FM_Voice_SetClientListening"); } public plugin_natives() {     register_library("SPEAK");     register_native("set_speak", "_set_speak");     register_native("get_speak", "_get_speak"); } public client_disconnect(id) {     SpeakFlags[id] = SPEAK_NORMAL; } public _set_speak(index, nums) {     new id = get_param(1);     if(!is_user_connected(id))     {         log_error(AMX_ERR_NATIVE, "[SetSpeak] Invalid player %d", id)         return;     }     SpeakFlags[id] = get_param(2); } public _get_speak(index, nums) {     new id = get_param(1);     if(!is_user_connected(id))     {         log_error(AMX_ERR_NATIVE, "[SetSpeak] Invalid player %d", id)         return 0;     }     return SpeakFlags[id]; } public _FM_Voice_SetClientListening(iReceiver, iSender, bool:bListen) {     if((SpeakFlags[iSender] & SPEAK_MUTED) != 0)     {         engfunc(EngFunc_SetClientListening, iReceiver, iSender, false);         forward_return(FMV_CELL, false);         return FMRES_SUPERCEDE;     }     if((SpeakFlags[iSender] & SPEAK_ALL) != 0)     {         engfunc(EngFunc_SetClientListening, iReceiver, iSender, true);         forward_return(FMV_CELL, true);         return FMRES_SUPERCEDE;     }     if((SpeakFlags[iReceiver] & SPEAK_LISTENALL) != 0)     {         engfunc(EngFunc_SetClientListening, iReceiver, iSender, true);         forward_return(FMV_CELL, true);         return FMRES_SUPERCEDE;     }     forward_return(FMV_CELL, bListen);     return FMRES_IGNORED; }
__________________
No private support via Instant Message
GunGame:SM Released

Last edited by teame06; 10-27-2006 at 15:50.
teame06 is offline
Send a message via AIM to teame06
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-27-2006 , 15:57   Re: set_speak in fakemeta...
Reply With Quote #3

Thanks....will try that.
organizedKaoS is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 10-27-2006 , 19:33   Re: set_speak in fakemeta...
Reply With Quote #4

No problem, Just tell me if works properly.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-28-2006 , 03:25   Re: set_speak in fakemeta...
Reply With Quote #5

Works for the most part.

Now I'm really stuck.

Been using fakemeta_util along with all other fakemeta stocks/funcs.

40+ plugins successfully converted over to fakemeta except for one.

How do I change radius_damage to work with fakemeta.

I'm tired right now and I've been through fakemeta and fakemeta_util includes for the past couple of hours but haven't found anything yet.

If you have any ideas please share. I'm gonna crash for now so hopefully someone knows how to do this.

Thanks.
organizedKaoS is offline
Old 10-28-2006, 08:32
VEN
This message has been deleted by VEN. Reason: reposting...
VEN
Veteran Member
Join Date: Jan 2005
Old 10-28-2006 , 08:55   Re: set_speak in fakemeta...
Reply With Quote #6

Quote:
How do I change radius_damage to work with fakemeta
Try this: http://forums.alliedmods.net/showthr...245#post389245
VEN is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-28-2006 , 14:05   Re: set_speak in fakemeta...
Reply With Quote #7

VEN....YOU ROCK.....+ KARMA

I don't know why my searches didn't turn that up.

Thanks again.

Last edited by organizedKaoS; 10-28-2006 at 14:07.
organizedKaoS is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 10-28-2006 , 14:51   Re: set_speak in fakemeta...
Reply With Quote #8

lol that code doesnt work... shall i post it here or are u going to fix it yourself?
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-28-2006 , 16:25   Re: set_speak in fakemeta...
Reply With Quote #9

Quote:
Originally Posted by P34nut View Post
lol that code doesnt work... shall i post it here or are u going to fix it yourself?
Actually it does.

Works perfect, like a charm. No errors in compiling and no run time errors from server.

Though I did have to edit it just a bit but yeah.....works fine.



Maybe VEN can add it to his fakemeta_util, with your permission of course.
Code:
stock fm_radius_damage(Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier)     {     new ent = 0     while ((ent = fm_find_ent_in_sphere(ent, fExplodeAt, float(5 * iRadiusMultiplier))) > 0)         {                 if (is_user_alive(ent) && !fm_get_user_godmode(ent))             {             new Float:plHealth             pev(ent, pev_health, plHealth)                         plHealth - 10.0 + iDamageMultiplier                         if (plHealth < 1)                 {                 user_kill(ent)             }             else                 {                 set_pev(ent, pev_health, plHealth)             }         }     }       ent = 0         while ((ent = fm_find_ent_in_sphere(ent, fExplodeAt, float(4 * iRadiusMultiplier))) > 0)         {                 if (is_user_alive(ent) && !fm_get_user_godmode(ent))             {             new Float:plHealth             pev(ent, pev_health, plHealth)                         plHealth - 25.0 + random_num(0, 2 * iDamageMultiplier)                         if (plHealth < 1)                 {                 user_kill(ent)             }             else                 {                 set_pev(ent, pev_health, plHealth)             }         }     }       ent = 0         while ((ent = fm_find_ent_in_sphere(ent, fExplodeAt, float(3 * iRadiusMultiplier))) > 0)         {                 if (is_user_alive(ent) && !fm_get_user_godmode(ent))             {             new Float:plHealth             pev(ent, pev_health, plHealth)                         plHealth - 50.0 + random_num(0, 3 * iDamageMultiplier)                         if (plHealth < 1)                 {                 user_kill(ent)             }             else                 {                 set_pev(ent, pev_health, plHealth)             }         }     }       ent = 0         while ((ent = fm_find_ent_in_sphere(ent, fExplodeAt, float(2 * iRadiusMultiplier))) > 0)         {         if (is_user_alive(ent) && !fm_get_user_godmode(ent))             {             user_kill(ent)         }     }     }

Last edited by organizedKaoS; 10-28-2006 at 16:30.
organizedKaoS is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 10-28-2006 , 16:41   Re: set_speak in fakemeta...
Reply With Quote #10

huh!?:S it gave me errors..

but VEN can add this if he want
__________________
All you need to change the world is one good lie and a river of blood

Last edited by P34nut; 10-28-2006 at 16:44.
P34nut 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 04:46.


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