Raised This Month: $51 Target: $400
 12% 

Detect OldModel and NewModel


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 05-10-2010 , 10:58   Detect OldModel and NewModel
Reply With Quote #1

for example:

PHP Code:
public client_infochanged(id) {
     new 
sOldName[32], sNewName[32]

     
get_user_name(idsOldName31)
     
get_user_info(idsNewName31)
     
     if(!
equali(sOldNamesNewName)) {
     
// My Code
     
}

but with models
PHP Code:
if(!equali(sOldModelsNewModel) {
     
// My Code
     

Not for cs
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-10-2010 , 18:06   Re: Detect OldModel and NewModel
Reply With Quote #2

Code:
#include < amxmodx > #include < fakemeta > const MAX_PLAYERS = 32; new g_szCurrentModel[ MAX_PLAYERS + 1 ][ 32 ]; public plugin_init( ) {     register_forward( FM_SetKeyValue, "FwdSetKeyValuePre" ); } public client_disconnect( iPlayer ) {     g_szCurrentModel[ iPlayer ][ 0 ] = 0; } public FwdSetKeyValuePre( iPlayer, szKey[ ], szValue[ ] ) {     if( equal( szKey, "model" ) )     {         // player's model is being set a value                 if( !equal( szValue, g_szCurrentModel[ iPlayer ] ) )         {             // current model is different                         // save new model             copy( g_szCurrentModel[ iPlayer ], charsmax( g_szCurrentModel[ ] ), szValue );         }     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 07:34.


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