Quote:
Originally Posted by Bos93
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 *amx, cell *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
__________________