Raised This Month: $ Target: $400
 0% 

[HELP] Detect Team Change (cstrike)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-15-2016 , 11:32   Re: [HELP] Detect Team Change (cstrike)
Reply With Quote #11

Quote:
Originally Posted by Bos93 View Post
new iTeam = OrpheuMemoryGetAtAddress( params + 4 , "int" );
new iModel = OrpheuMemoryGetAtAddress( params + 8 , "int" );

Why did you add these numbers?
Because if you look at the source for the function, the parameters are passed in an array. params is the address of the array. The player id is in the first cell so no offset is needed; team is in the second cell (+ 4 bytes offset) and model is in the third cell (+8 bytes offset)

CstrikeNatives.cpp
PHP Code:
static cell AMX_NATIVE_CALL cs_set_user_team(AMX *amxcell *params// cs_set_user_team(index, team, model = 0); = 3 params
{
    
// Set user team
    // params[1] = user index
    // params[2] = team
    // params[3] = model = 0 
__________________

Last edited by Bugsy; 10-15-2016 at 16:01.
Bugsy 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 09:56.


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