Raised This Month: $ Target: $400
 0% 

Boolean not changing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-13-2017 , 06:58   Re: Boolean not changing
Reply With Quote #1

No, not like he's showing you. This is the proper way:
PHP Code:
new Players[32], PlayersNum
get_players
(PlayersPlayersNum)
new 
id

for(new iPlayersNumi++)
{
    
id Players[i]
    
g_Newround[id] = true

For what are you using g_Newround? It looks like it should not be an array(i.e. simply new g_Newround/ g_Newround = true will work).
__________________
HamletEagle is offline
heroicpower7613
Member
Join Date: Nov 2016
Old 04-17-2017 , 12:10   Re: Boolean not changing
Reply With Quote #2

Quote:
Originally Posted by HamletEagle View Post
No, not like he's showing you.


For what are you using g_Newround? It looks like it should not be an array(i.e. simply new g_Newround/ g_Newround = true will work).
it needs to be true or false for specific players, that's why there should be id?
what's wrong with the way Lord showed?
heroicpower7613 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-17-2017 , 12:59   Re: Boolean not changing
Reply With Quote #3

Quote:
Originally Posted by heroicpower7613 View Post
it needs to be true or false for specific players, that's why there should be id?
what's wrong with the way Lord showed?
First of all, whats lord is doing, hes looping all players slots, including the non existing one's, and printing msgs which will throw an error because sending to unconnected players. And the server slots might not be 32
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-17-2017 at 12:59.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 18:03.


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