Raised This Month: $ Target: $400
 0% 

stock print


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-09-2020 , 13:35   Re: stock print
Reply With Quote #5

@Shadows Adi - read the first post again.

PHP Code:
// You don't need an "id" parameter - you're sending the message to a GROUP of players.
print_admin(const id, const input[], any:...)
{
    
// Why is count = 1?
    
new count 1players[32];
    static 
msg[191];

    
// Use charsmax(msg) instead of 190.
    
vformat(msg190input3);
    
    
// Again not needed - only get_players() should stay.
    
if(id)
        
players[0] = id;
    else
        
get_players(playerscount"ch");
    
    for (new 
0counti++)
    {
        
players[i]

        
// Indentation or { brackets } after the check would be nice.
        
if(is_user_admin(x))
        
        
// Don't use "magic numbers". The second argument should be "print_team_default", not 0.
        
client_print_color(x0msg)
    }

Try to think what you're doing. If you went line by line through the code, you probably could have figured it out.
You simply need to send a message to all admins, so there's no "id" involved at all - the player sending the message (if existant) is not relevant.
__________________

Last edited by OciXCrom; 01-09-2020 at 13:38.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
 



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 02:42.


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