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

[Resolved] help me with loop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 05-02-2014 , 16:42   [Resolved] help me with loop
Reply With Quote #1

how do I check steam id of 32 players?

new players[32], num

get_players(players, num)

for(new i=0; i<num; i++)
{
new id = players[i]
get_user_authid(id, players[i], 32)
}

correct me if im wrong?

Last edited by felipemilralze; 05-03-2014 at 15:53.
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-02-2014 , 16:46   Re: help me with loop
Reply With Quote #2

Check them against what? And yes that is wrong regardless 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
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-02-2014 , 16:52   Re: help me with loop
Reply With Quote #3

How to get 32 players steam id
PHP Code:
new szAuthid[33][32], Players[32], iNum
get_players
(PlayersiNum)
for(new 
0iNumi++)
{
get_user_authid(Players[i], szAuthid[Players[i]], 31)

fixed

Last edited by Natsheh; 10-14-2014 at 07:47. Reason: Sorry didnt notice
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Old 05-02-2014, 16:54
Natsheh
This message has been deleted by YamiKaitou. Reason: duplicate
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-02-2014 , 16:55   Re: help me with loop
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
How to get 32 players steam id
[PHP]
new szAuthid[32], Players[32], iNum
get_players(Players, iNum)
for(new i = 0; i < iNum; i++)
{
get_user_authid(Players[i], szAuthid, 31)
}
Wrong, that will just get the last player's SteamID
__________________
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
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 05-02-2014 , 17:01   Re: help me with loop
Reply With Quote #5

Quote:
Originally Posted by YamiKaitou View Post
Check them against what? And yes that is wrong regardless what you are trying to do.
I have a registration system with "nfvault". Wanted then everyone who enters with steam save automatically ammopacks, can help me with this?
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-02-2014 , 17:03   Re: help me with loop
Reply With Quote #6

So then when you go to save the ammopacks, just retrieve that players SteamID. No need to loop through everyone (unless you are saving everyone at the same time)
__________________
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
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 05-02-2014 , 17:05   Re: help me with loop
Reply With Quote #7

Quote:
Originally Posted by YamiKaitou View Post
Wrong, that will just get the last player's SteamID
exactly is saving only a player, I want for everyone
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 05-02-2014 , 17:31   Re: help me with loop
Reply With Quote #8

PHP Code:
    new szAuthid[33][32], Players[32], iNumid
    get_players
(PlayersiNum
    for(new 
0iNumi++) 
    { 
        
id Players[i]
        
get_user_authid(idszAuthid[id], 31
    } 

Last edited by NikKOo31; 05-02-2014 at 17:31.
NikKOo31 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-03-2014 , 00:22   Re: help me with loop
Reply With Quote #9

Use input_Client
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-03-2014 , 01:15   Re: help me with loop
Reply With Quote #10

Quote:
Originally Posted by Natsheh View Post
Use input_Client
To what are you referring? That does not exist in AMX Mod X.
__________________
fysiks 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 13:17.


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