Raised This Month: $51 Target: $400
 12% 

[Paid Requests] A slew of Plugin Requests


Post New Thread Reply   
 
Thread Tools Display Modes
Sumsar
SourceMod Donor
Join Date: Jan 2012
Old 09-14-2012 , 16:03   Re: [Paid Requests] A slew of Plugin Requests
Reply With Quote #11

Hello.
I'm just wondering if anyone could do this one "Server-Filling Perks" but only so it gives the a flag to the first 5.

If you wan't money for this, tell me how much.

Last edited by Sumsar; 09-14-2012 at 16:04.
Sumsar is offline
-Absolute-
Member
Join Date: Mar 2010
Old 09-14-2012 , 18:15   Re: [Paid Requests] A slew of Plugin Requests
Reply With Quote #12

Try this script: (it will give the Custom1 flag to the first 5 user who connect)


PHP Code:
#include <sourcemod>

new Handle:g_hConVar;

public 
OnPluginStart()
{
    
g_hConVar CreateConVar("sm_benefitplayers""5""The first X players who join the server will get the Custom1 Flag");
    
AutoExecConfig();
}



public 
OnClientPutInServer(client)
{
    new 
playercount 0;
    new 
benefitplayers GetConVarInt(g_hConVar);
    for (new 
1;<= MaxClients;i++)
    {
        if (
IsClientInGame(i) && IsClientConnected(i) && !IsFakeClient(i))
        {
            
playercount++;
            if (
playercount benefitplayers) return;
        }
    }
    
AddUserFlags(clientAdmin_Custom1);

If it works please donate the money here:
http://www.sourcemod.net/donate.php

Last edited by -Absolute-; 09-14-2012 at 18:16.
-Absolute- is offline
Sumsar
SourceMod Donor
Join Date: Jan 2012
Old 09-14-2012 , 20:31   Re: [Paid Requests] A slew of Plugin Requests
Reply With Quote #13

Going to test it now and I have already donated a while ago.

EDIT: Working great so far, thanks!
Quote:
Originally Posted by -Absolute- View Post
Try this script: (it will give the Custom1 flag to the first 5 user who connect)


PHP Code:
#include <sourcemod>

new Handle:g_hConVar;

public 
OnPluginStart()
{
    
g_hConVar CreateConVar("sm_benefitplayers""5""The first X players who join the server will get the Custom1 Flag");
    
AutoExecConfig();
}





public 
OnClientPutInServer(client)
{
    new 
playercount 0;
    new 
benefitplayers GetConVarInt(g_hConVar);
    for (new 
1;<= MaxClients;i++)
    {
        if (
IsClientInGame(i) && IsClientConnected(i) && !IsFakeClient(i))
        {
            
playercount++;
            if (
playercount benefitplayers) return;
        }
    }
    
AddUserFlags(clientAdmin_Custom1);

If it works please donate the money here:
http://www.sourcemod.net/donate.php

Last edited by Sumsar; 09-14-2012 at 22:05.
Sumsar is offline
Snack Patrol
Member
Join Date: Jan 2012
Location: Earth
Old 09-14-2012 , 20:52   Re: [Paid Requests] A slew of Plugin Requests
Reply With Quote #14

Sorry guys, I've been busy, I will respond to this thread in a bit later tonight.
Snack Patrol is offline
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 12:02.


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