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

[REQ] Give Reservation Flag 16k Every Round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 06-02-2008 , 02:03   [REQ] Give Reservation Flag 16k Every Round
Reply With Quote #1

Can someone make a quick plugin that gives 16k to anyone with the a flag for css? Thanks! +karma to anyone that does!
__________________

DontWannaName is offline
MoggieX
Veteran Member
Join Date: Aug 2007
Location: n00bville
Old 06-02-2008 , 19:23   Re: [REQ] Give Reservation Flag 16k Every Round
Reply With Quote #2

Quote:
Originally Posted by DontWannaName View Post
Can someone make a quick plugin that gives 16k to anyone with the a flag for css? Thanks! +karma to anyone that does!

Try this, which will look for the flag ADMFLAG_RESERVATION on a player at spawn

PHP Code:
/* 
    Extra Cash
        Adds 16000 to every player on spawn 
        
*/


#include <sourcemod>

#define VERSION "0.2"
#define ADMIN_LEVEL ADMFLAG_RESERVATION

new g_iAccount = -1;
new 
Handle:Switch;
new 
Handle:Cash;

public 
Plugin:myinfo 
{
    
name "Extra Cash",
    
author "Peoples Army",
    
description "Adds Extra Cash On Each Spawn",
    
version VERSION,
    
url "www.sourcemod.net"
}

public 
OnPluginStart()
{
    
g_iAccount FindSendPropOffs("CCSPlayer""m_iAccount");
    Switch = 
CreateConVar("extra_Cash_on","1","1 turns plugin on 0 is off",FCVAR_NOTIFY);
    
Cash CreateConVar("extra_cash_amount","16000","Sets Amount OF Money Given On Spawn",FCVAR_NOTIFY);
    
HookEvent("player_spawn" Spawn);
}

public 
Spawn(Handleevent , const Stringname[] , booldontBroadcast)
{
    new 
clientID GetEventInt(event,"userid");
    new 
client GetClientOfUserId(clientID);
    if(
GetConVarInt(Switch))
    {
        if (
GetUserFlagBits(client) & ADMIN_LEVEL)
        {
            
SetMoney(client,GetConVarInt(Cash));
        }
    }
}

public 
SetMoney(clientamount)
{
    if (
g_iAccount != -1)
    {
        
SetEntData(clientg_iAccountamount);
    }    

Matt
Attached Files
File Type: sp Get Plugin or Get Source (extra_cash_res.sp - 708 views - 1.1 KB)
File Type: smx extra_cash_res.smx (1.9 KB, 156 views)
__________________
MoggieX is offline
Send a message via Skype™ to MoggieX
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 06-02-2008 , 21:02   Re: [REQ] Give Reservation Flag 16k Every Round
Reply With Quote #3

Thanks, I will go try it.
__________________

DontWannaName is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 06-02-2008 , 22:58   Re: [REQ] Give Reservation Flag 16k Every Round
Reply With Quote #4

Works
__________________

DontWannaName is offline
Sir Jake
Senior Member
Join Date: Jan 2009
Old 01-29-2009 , 01:14   Re: [REQ] Give Reservation Flag 16k Every Round
Reply With Quote #5

This works great, just wondering how I can setup it so the first round they don't get 16k?

Thanks in advance.
Sir Jake is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 01-30-2009 , 19:17   Re: [REQ] Give Reservation Flag 16k Every Round
Reply With Quote #6

Make another if statement hooking the first round event.
__________________

DontWannaName is offline
k0s
Junior Member
Join Date: Dec 2008
Location: Hamburg / Cologne
Old 02-03-2009 , 16:25   Re: [REQ] Give Reservation Flag 16k Every Round
Reply With Quote #7

this is somehow what i was looking for.

i just try to give "flagged" users EVERY round a certain amount of cash.
honestly i am new to sm scripting and end up to get the actual cash amount from clients and add a certain amount :\

could you help me out ?!
__________________

finest CS, CSS, TF2 and finally L4D community
k0s 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 21:36.


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