Raised This Month: $ Target: $400
 0% 

Solved Print to all not just id or user


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
THC420
Junior Member
Join Date: Apr 2018
Old 04-23-2018 , 13:56   Re: Print to all not just id or user
Reply With Quote #1

PHP Code:
for (new id 1id <= g_maxplayersid++)
    {
        
print_message(idmessage)  

THC420 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-25-2018 , 11:40   Re: Print to all not just id or user
Reply With Quote #2

Quote:
Originally Posted by THC420 View Post
PHP Code:
for (new id 1id <= g_maxplayersid++)
    {
        
print_message(idmessage)  

Never use that to loop through all players, this is the correct way.

Code:
new players[32], inum, id get_players(players, inum) for(new i; i < inum; i++) {     id = players[i]     client_print(id, print_chat, "Message") }
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 04:34.


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