Raised This Month: $ Target: $400
 0% 

---


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Statistical       
vedant007
Member
Join Date: Jul 2013
Old 01-11-2015 , 02:59   ---
Reply With Quote #1

---

Last edited by vedant007; 03-18-2020 at 16:32.
vedant007 is offline
Send a message via Skype™ to vedant007
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-11-2015 , 03:23   Re: HUD MSG to Greet players[Admin,VIP,player]
Reply With Quote #2

No need to attach .zip file as your .sma only one. Just directly upload the .sma file.

Next, don't upload the .amxx file.

ID of a task also is not needed as you don't use remove_task.

Last edited by zmd94; 01-11-2015 at 03:36.
zmd94 is offline
Old 01-11-2015, 03:29
vedant007
This message has been deleted by vedant007.
Old 01-11-2015, 03:42
vedant007
This message has been deleted by vedant007.
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-11-2015 , 03:54   Re: HUD MSG to Greet players[Admin,VIP,player]
Reply With Quote #5

Please get used to use charsmax instead of writing the number.
Code:
public flappybuird(taskid)
{
     new name[32],id=taskid;
     get_user_name(id,name,31)
     if(get_user_flags(id)&ADMIN_LEVEL_B)
     {
     set_dhudmessage(0, 255, 0, 0.28, 0.16, 0, 6.0, 12.0)
     show_dhudmessage(id, "Glad to see the Administrator %s ! Enjoy the game.", name)
     }
     else if(get_user_flags(id)&ADMIN_LEVEL_H)
     {
     set_dhudmessage(0, 255, 0, 0.28, 0.16, 0, 6.0, 12.0)
     show_dhudmessage(id, "Glad to see you VIP %s! Enjoy the game.", name)
     }
     else
     {
     set_dhudmessage(0, 255, 0, 0.28, 0.16, 0, 6.0, 12.0)
     show_dhudmessage(id, "Glad to see you %s ! Enjoy the game.", name)
     }
}
-->
Code:
public flappybuird(id)
{
    new szName[32]
    get_user_name(id, szName, charsmax(szName))
     
    if(get_user_flags(id) & ADMIN_LEVEL_B)
    {
        set_dhudmessage(0, 255, 0, 0.28, 0.16, 0, 6.0, 12.0)
        show_dhudmessage(id, "Glad to see the Administrator %s! Enjoy the game.", szName)
    }
    else if(get_user_flags(id) & ADMIN_LEVEL_H)
    {
        set_dhudmessage(0, 255, 0, 0.28, 0.16, 0, 6.0, 12.0)
        show_dhudmessage(id, "Glad to see you VIP %s! Enjoy the game.", szName)
    }
    else
    {
        set_dhudmessage(0, 255, 0, 0.28, 0.16, 0, 6.0, 12.0)
        show_dhudmessage(id, "Glad to see you %s ! Enjoy the game.", szName)
    }
}

Last edited by zmd94; 01-11-2015 at 03:57.
zmd94 is offline
Old 01-11-2015, 04:18
vedant007
This message has been deleted by vedant007.
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-11-2015 , 06:06   Re: HUD MSG to Greet players[Admin,VIP,player]
Reply With Quote #7

Writting number is sort of hardcoded. So, using charsmax is the optmized way.

Well, it won't really affect the usage of plugin, just something for have a better code.
zmd94 is offline
Old 01-11-2015, 06:39
vedant007
This message has been deleted by vedant007.
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-11-2015 , 08:38   Re: HUD MSG to Greet players[Admin,VIP,player]
Reply With Quote #9

It is better if you add more features.

Last edited by zmd94; 01-11-2015 at 08:39.
zmd94 is offline
Old 01-11-2015, 08:51
vedant007
This message has been deleted by vedant007.
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 07:10.


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