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

Request AutoCash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hakstern
Junior Member
Join Date: Oct 2016
Old 10-20-2016 , 23:31   Request AutoCash
Reply With Quote #1

For CSGO


hi i seen the plugin SM_AutoCash

and i am currently using this, but i was wondering can somone help me make a plugin

that will automatically do this every time? The autocash already offers 16000 everytime they spawn

but i would like to be able to set this up where i don't need an admin to use the command. And work as a plugin to always be on.

Last edited by hakstern; 10-21-2016 at 04:56.
hakstern is offline
mon9898
New Member
Join Date: Jan 2010
Location: Singapore
Old 10-21-2016 , 04:53   Re: Request AutoCash
Reply With Quote #2

Assuming its csgo, why not mp_afterroundmoney 16000
__________________
Fa la la la la la la
mon9898 is offline
Send a message via Skype™ to mon9898
hakstern
Junior Member
Join Date: Oct 2016
Old 10-21-2016 , 04:56   Re: Request AutoCash
Reply With Quote #3

Quote:
Originally Posted by mon9898 View Post
Assuming its csgo, why not mp_afterroundmoney 16000
Does it write it in chat tho? I like how it auto chats and spams it thats why.
hakstern is offline
Unbelievable
Senior Member
Join Date: Jan 2016
Old 10-22-2016 , 13:51   Re: Request AutoCash
Reply With Quote #4

What about mp_startmoney 16000
Unbelievable is offline
hakstern
Junior Member
Join Date: Oct 2016
Old 10-22-2016 , 22:07   Re: Request AutoCash
Reply With Quote #5

Quote:
Originally Posted by Unbelievable View Post
What about mp_startmoney 16000
Yes, but i wnat it to state in printchat

"[dingo server] Gave 16000"

and i want it to be every respawn.
hakstern is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 10-23-2016 , 01:13   Re: Request AutoCash
Reply With Quote #6

Quote:
Originally Posted by hakstern View Post
Yes, but i wnat it to state in printchat

"[dingo server] Gave 16000"

and i want it to be every respawn.
You mean that when I gets respawn I gets 16000 and a message like:
[Dingo Server]You just got 16,000 money.

?
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox is offline
CamerDisco
AlliedModders Donor
Join Date: Aug 2015
Location: Poland
Old 10-23-2016 , 06:13   Re: Request AutoCash
Reply With Quote #7

PHP Code:
#include <sourcemod>

new g_iAccount = -1;

public 
OnPluginStart()
{
    
g_iAccount FindSendPropOffs("CCSPlayer""m_iAccount");
    
    
HookEvent("player_spawn"spawn);
}



public 
spawn(Handle:event, const String:name[], bool:dontBroadcast
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    if(
IsValidClient(client))
    {
        
SetMoney(client16000);
        
PrintToChat(client"[Dingo server] Gave 16000");
    }
}


public 
bool:IsValidClient(client)
{
    if(
client >= && client <= MaxClients && IsClientInGame(client) && IsClientConnected(client) && !IsClientSourceTV(client))
        return 
true;

    return 
false;
}


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

__________________


Max-Play.pl - the best polish servers
CamerDisco is offline
hakstern
Junior Member
Join Date: Oct 2016
Old 10-23-2016 , 20:11   Re: Request AutoCash
Reply With Quote #8

Quote:
Originally Posted by CamerDisco View Post
PHP Code:
#include <sourcemod>

new g_iAccount = -1;

public 
OnPluginStart()
{
    
g_iAccount FindSendPropOffs("CCSPlayer""m_iAccount");
    
    
HookEvent("player_spawn"spawn);
}



public 
spawn(Handle:event, const String:name[], bool:dontBroadcast
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    if(
IsValidClient(client))
    {
        
SetMoney(client16000);
        
PrintToChat(client"[Dingo server] Gave 16000");
    }
}


public 
bool:IsValidClient(client)
{
    if(
client >= && client <= MaxClients && IsClientInGame(client) && IsClientConnected(client) && !IsClientSourceTV(client))
        return 
true;

    return 
false;
}


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

Thank you so much!! i can't express it enough lol

Also is there a way to change chat color? of the text i tried to copy paste from other but i get a error compiling.

Doesn't seem to give cash to any players it just spams the text. Should i just add this to the exisitng plugin maybe it'll work?

Code:
"\x04[\x03Dingo Server\x04]

Last edited by hakstern; 10-23-2016 at 21:58.
hakstern 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 17:28.


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