AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Cashmod: normal ppl 40 cash, vips 60 cash HOW? (https://forums.alliedmods.net/showthread.php?t=155214)

majkan 04-18-2011 17:17

Cashmod: normal ppl 40 cash, vips 60 cash HOW?
 
Hi

Im trying to do so those who bought VIP on my server gets 60 cash instead of 40 when the kill someone, and 80 cash instead of 60 for surviving a round.

The code looks like this now

Code:

                    if( g_Admin[killer] && g_iCash[killer] < 99938 )
                    {
                        g_iCash[killer] += 40;
       
                        formatex(format_text, sizeof(format_text) - 1, "^x03You recieved 40 cash for killing^x04 %s", vic_name);
                    }
                    else
                    {
                        g_iCash[killer] += 40;
                        formatex(format_text, sizeof(format_text) - 1, "^x03You recieved 40 cash for killing^x04 %s", vic_name);
                    }
                        //VIP Cash
                        if ( access( killer, ADMIN_LEVEL_C) )
                            g_iCash[killer] += 20;
                            formatex(format_text, sizeof(format_text) - 1, "^x03You recieved 60 cash for killing^x04 %s", vic_name);

But when someone with access "C" kill someone they get 100 cash instead of 60, and when someone without access "C" kill someone they get 40 cash but it says they got 60 cash for killing the player.

Can anyone help me to fix this?

Erox902 04-19-2011 17:22

Re: Cashmod: normal ppl 40 cash, vips 60 cash HOW?
 
seems as your giving him 40 for the first if statement and 40 for the else statement and then 20 for the if vip statement


All times are GMT -4. The time now is 19:58.

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