Raised This Month: $ Target: $400
 0% 

player ID finding


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kazalu
Senior Member
Join Date: Dec 2013
Location: Romania
Old 02-01-2014 , 17:40   player ID finding
Reply With Quote #1

What's the function used to put a player's ID on a variable called 'uid'?
Kazalu is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-01-2014 , 17:45   Re: player ID finding
Reply With Quote #2

Please explain what you are trying to do
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Kazalu
Senior Member
Join Date: Dec 2013
Location: Romania
Old 02-01-2014 , 17:49   Re: player ID finding
Reply With Quote #3

Im trying to get player's ID so that I can use that ID later on my script.just need the function for finding the ID
Kazalu is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-01-2014 , 18:49   Re: player ID finding
Reply With Quote #4

Most forwards already provide you with the Index of the player. What forward are you using that doesn't?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Kazalu
Senior Member
Join Date: Dec 2013
Location: Romania
Old 02-02-2014 , 01:51   Re: player ID finding
Reply With Quote #5

I didnt modify any forwars or. Inc's, so what's the basic code that is needed to return a player's ID?

new userid = get_user_userid(index) ?

Last edited by Kazalu; 02-02-2014 at 01:54.
Kazalu is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-02-2014 , 01:52   Re: player ID finding
Reply With Quote #6

That depends on what you are doing. Please explain what you are trying to do.
__________________
fysiks is offline
Kazalu
Senior Member
Join Date: Dec 2013
Location: Romania
Old 02-02-2014 , 10:58   Re: player ID finding
Reply With Quote #7

I'm trying to make a script work.That script is using a function called 'public Get_Munitie(id)' and the compiler gives me error : undefined symbol 'id' . So, I have tot initialise that userid with another function and I don't know how.
Kazalu is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-02-2014 , 10:58   Re: player ID finding
Reply With Quote #8

Care to show us more of the code so we can understand what exactly you are doing?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Kazalu
Senior Member
Join Date: Dec 2013
Location: Romania
Old 02-02-2014 , 11:05   Re: player ID finding
Reply With Quote #9

Cmon man, I cant show it right now, as Im on a mobile device. I'll try to make a plan o the code.thats all i can do.Sorry for the last '}'.It's not in the code and I can't delete it(very good phone what can I say).

public Get_Munitie(id) // here I get undefined symbol 'id'
{
.
.
.
return Munitie
}


public plugin_init()
{
.
.
.
something = Get_Munitie(id)
}
}

Last edited by Kazalu; 02-02-2014 at 11:19.
Kazalu is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-02-2014 , 11:22   Re: player ID finding
Reply With Quote #10

id is undefined in plugin_init as it is a Global Forward. In order to get player index's in a global forward/function requires you to create a loop to obtain the indexes (using get_players preferably).
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 17:56.


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