This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[Help Req] Round Money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DeathOrAlive
Member
Join Date: Sep 2015
Location: Sofia, Bulgaria
Old 09-10-2015 , 19:53   [Help Req] Round Money
Reply With Quote #1

Hello guys, so I'm trying to make a code for my VIP users to get +1000$ every round (without the first one ofcourse, it would be unfair), but unfortunately I failed... This is my code, can you tell me where am I making a mistake and fix it for me please?
PHP Code:
public onSpawn(Player)
{
    if(
is_user_alive(Player))
    {
        if(
get_user_flags(Player) & ADMIN_RESERVATION)
        {
            
cs_set_user_money(Playerclamp(cs_get_user_money(Player) + 1000016000));
            new 
name[33]
            
get_user_name(Player,name,charsmax(name))
            
ClientPrintColor(Player"^4[^3FrontLineD2^4]^1Because of his ^4VIP privileges^1, player ^3%s^1 is getting^4 1000$^1 bonus!"name)
        }

    }

__________________
Mess with the best, die like the rest!

Quote:
Originally Posted by aron9forever View Post
You're trying to run 11 servers on each core?
You're bringing the word retard to a new level.
DeathOrAlive is offline
Send a message via Skype™ to DeathOrAlive
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-10-2015 , 20:30   Re: [Help Req] Round Money
Reply With Quote #2

PHP Code:
cs_set_user_money(Playerclamp(cs_get_user_money(Player) + 1000016000)); 

PHP Code:
cs_set_user_money(Player, ( cs_get_user_moneyPlayer ) + 1000)); 
What do you mean by the first round? The first round a player plays or the first round of the map?


Edit:

PHP Code:
public onSpawnPlayer )
{
    new 
name33 ];
    
get_user_namePlayer,name,charsmaxname ) )
    
    if( 
is_user_alivePlayer ) && ( get_user_flagsPlayer ) & ADMIN_RESERVATION ) )
    {
        
cs_set_user_money(Player, ( cs_get_user_moneyPlayer ) + 1000));
        
ClientPrintColor(Player"^4[^3FrontLineD2^4]^1Because of his ^4VIP privileges^1, player ^3%s^1 is getting^4 1000$^1 bonus!"name)
        
    }

__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 09-10-2015 at 20:38.
wickedd is offline
DeathOrAlive
Member
Join Date: Sep 2015
Location: Sofia, Bulgaria
Old 09-10-2015 , 20:49   Re: [Help Req] Round Money
Reply With Quote #3

The code still doesn't give the money, neither prints the message.

P.S. I meant the first round of the map, when everybody has 800$.
__________________
Mess with the best, die like the rest!

Quote:
Originally Posted by aron9forever View Post
You're trying to run 11 servers on each core?
You're bringing the word retard to a new level.

Last edited by DeathOrAlive; 09-10-2015 at 20:57.
DeathOrAlive is offline
Send a message via Skype™ to DeathOrAlive
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-10-2015 , 20:50   Re: [Help Req] Round Money
Reply With Quote #4

Attach the .sma
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
DeathOrAlive
Member
Join Date: Sep 2015
Location: Sofia, Bulgaria
Old 09-10-2015 , 20:59   Re: [Help Req] Round Money
Reply With Quote #5

Here it is
Attached Files
File Type: sma Get Plugin or Get Source ([FrontLineD2] VIP.sma - 458 views - 4.4 KB)
__________________
Mess with the best, die like the rest!

Quote:
Originally Posted by aron9forever View Post
You're trying to run 11 servers on each core?
You're bringing the word retard to a new level.
DeathOrAlive is offline
Send a message via Skype™ to DeathOrAlive
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-10-2015 , 21:07   Re: [Help Req] Round Money
Reply With Quote #6

Start by reading this.

Then call public onSpawn( Player ) on round start.

P.S. The reason it's not working is because you never called onSpawn.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 09-10-2015 at 21:13.
wickedd is offline
DeathOrAlive
Member
Join Date: Sep 2015
Location: Sofia, Bulgaria
Old 09-10-2015 , 21:09   Re: [Help Req] Round Money
Reply With Quote #7

When I open the page it shows "404 Not Found"...
__________________
Mess with the best, die like the rest!

Quote:
Originally Posted by aron9forever View Post
You're trying to run 11 servers on each core?
You're bringing the word retard to a new level.
DeathOrAlive is offline
Send a message via Skype™ to DeathOrAlive
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-10-2015 , 21:14   Re: [Help Req] Round Money
Reply With Quote #8

Oops. I posted the wrong link, try is now.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
DeathOrAlive
Member
Join Date: Sep 2015
Location: Sofia, Bulgaria
Old 09-10-2015 , 21:34   Re: [Help Req] Round Money
Reply With Quote #9

I read it like 5-6 times, but I still find it hard to see how exactly to repair my mistake and define the OnSpawn...
__________________
Mess with the best, die like the rest!

Quote:
Originally Posted by aron9forever View Post
You're trying to run 11 servers on each core?
You're bringing the word retard to a new level.
DeathOrAlive is offline
Send a message via Skype™ to DeathOrAlive
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-10-2015 , 22:33   Re: [Help Req] Round Money
Reply With Quote #10

Search the forum or look at other plugins to learn how to do it.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd 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 15:29.


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