Raised This Month: $ Target: $400
 0% 

convert user index to userid


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Swear
Junior Member
Join Date: May 2009
Location: Latvia
Old 09-02-2012 , 10:44   convert user index to userid
Reply With Quote #1

i have got players index it's 1-32. but userid is different. so i need to do something with player after typing amx_action 1 in servers console.

i tried this so far:

PHP Code:
public amxaction(id) {
    
    new 
target[128];
    
read_args(target127);
    
    new 
players[32], inum;
    
get_players(playersinum);
    new 
player players[target]; 
but it doesn't seem to work. it throws error 033: array must be indexed (variable "target")

it's because i need to manipulate with players from rcon. my php script got playerx index number and i need to activate command on him. i could use amx_action playerx but i think it could be buggy if others have similar nickname.
Swear is offline
Send a message via Skype™ to Swear
 



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 08:19.


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