Raised This Month: $ Target: $400
 0% 

What's wrong with this code?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 09-30-2011 , 08:12   What's wrong with this code?
Reply With Quote #1

PHP Code:
public client_authorized(id)
{
 
set_task(60.0"PrintText" ,id)
}
public 
PrintText(id)
{
 
client_print(idprint_chat"[VIP] Write /wantvip and u will see VIP privilegies and hot to get VIP.")

It should write one time "[VIP] Write /wantvip and u will see VIP privilegies and hot to get VIP.", but sometimes it writes triple.

And why this code gives grenades every round and when new player joins server?
PHP Code:
public fwHamPlayerSpawnPost() {

    new 
players[32], playerpnum;
    
get_players(playerspnum"a");
    for(new 
0pnumi++)
    {
        
player players[i];
        if(
is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_I)
        {
        
give_item(player"weapon_hegrenade");
        
give_item(player"weapon_flashbang");
        
give_item(player"weapon_flashbang");
        
give_item(player"weapon_smokegrenade");
        
give_item(player"item_assaultsuit");
        
give_item(player"item_thighpack");
        }
    }
    return 
PLUGIN_HANDLED


Last edited by Evaldas.Grigas; 09-30-2011 at 08:17.
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
 



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 19:34.


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