AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Jail Awards with credits system (https://forums.alliedmods.net/showthread.php?t=174843)

Franc1sco 12-26-2011 11:30

[CS:S] Jail Awards with credits system
 
Curent Version: 1.2 now credits can be saved

Description:

You can buy awards in jail with a credits system. Kill players for win credits.


Requirements:
SDK Hooks


Cvars:
Put in server.cfg
Code:

awards_credits_max 100 // max of credits allowed (0: No limit)
awards_credits_kill 1 // credits for kill
ammo_interval 5 // How often to reset ammo for the price "Infinite ammo" (in seconds).
awards_credits_save 1 // enable or disable that credits can be saved


Commands:

sm_awards - open the awards menu
sm_credits - view your current credits
sm_revive - you can revive with credits
sm_medic - you can heal with credits
sm_setcredits <#userid|name> [amount] - admin command (ROOT) for set credits in players


Awards list:

Be invisible - 10 Credits
Buy AWP - 9 Credits
Becoming a barrel - 8 Credits
INMORTAL 20 seconds - 7 Credits
Infinite ammo - 6 Credits
More speed - 5 Credits
Becoming BIRD - 5 Credits
Have 200 HP - 4 Credits
Buy USP pistol - 2 Credits
Buy Flashbang - 1 Credits
Healing - 1 Credits
Buy knife - 1 Credits


Credits:

Infinite ammo by http://forums.alliedmods.net/showthread.php?t=107900
Based in my ES plugin "Sistema de Creditos": http://addons.eventscripts.com/addon...ma_de_creditos


Note: this is a reduced version of the plugin of my jail server :3 (the full version is private), the server with my private version IP 93.93.65.101:27025


Donations (optional):

If you apreciate my work, you can donate me via paypal or with a trade offer


Download:

Main repository
Direct download
Code changes

graffiti007 12-28-2011 01:49

Re: [CS:S] Jail Awards with credits system
 
Cool plugin!

OxfordL 12-28-2011 05:30

Re: [CS:S] Jail Awards with credits system
 
Nice :)

ScorpFire 02-05-2012 23:59

Re: [CS:S] Jail Awards with credits system
 
It will be nice if you can add the option to modify each awards credits, or disable some awards.

Mata Patos 02-06-2012 03:54

Re: [CS:S] Jail Awards with credits system
 
Hi Franc1sco

It's a nice plugin. But i have one question.
We can edit da Award List? Like change the credits?

And you can create a command for commun player like !awardmenu or !award, and etc.

PreFix 06-11-2012 18:33

Re: [CS:S] Jail Awards with credits system
 
Nice plugin.Can you make giving credits for winning a round.And can I configurate prices and Awards in some config file?

Mitchell 06-12-2012 00:17

Re: [CS:S] Jail Awards with credits system
 
Quote:

Originally Posted by Franc1sco (Post 1619925)
Buy knife - 1 Credits

what?

Franc1sco 06-12-2012 11:14

Re: [CS:S] Jail Awards with credits system
 
Quote:

Originally Posted by Mitchell (Post 1727091)
what?

something wrong with you?

Useful for disarmed terrorist that had in my jail by my custom dice (a long history)

Mitchell 06-13-2012 13:33

Re: [CS:S] Jail Awards with credits system
 
Quote:

Originally Posted by Franc1sco (Post 1727317)
something wrong with you?

Useful for disarmed terrorist that had in my jail by my custom dice (a long history)

Makes more since now, you should add support on disabling certain buys.

EGood 06-14-2012 20:04

Re: [CS:S] Jail Awards with credits system
 
Nice Bro

PreFix 06-27-2012 15:13

Re: [CS:S] Jail Awards with credits system
 
Sure make some more options and configurations.And those credits are for one map or they are saving in some database?

EGood 06-27-2012 23:28

Re: [CS:S] Jail Awards with credits system
 
hi, do it only for the T ..
i think its good only for the T

PreFix 06-28-2012 09:33

Re: [CS:S] Jail Awards with credits system
 
And sure it's should to be for T only...

Franc1sco 06-28-2012 10:54

Re: [CS:S] Jail Awards with credits system
 
Quote:

Originally Posted by EGood (Post 1737760)
hi, do it only for the T ..
i think its good only for the T

Change this

Code:

public Action:DOMenu(client,args)
{
    DID(client);
    PrintToChat(client, "\x04[SM_JailAwards] \x05Your credits: %i", g_iCredits[client]);
}

For this

Code:

public Action:DOMenu(client,args)
{
    if(GetClientTeam(client) != 2)
    {
        PrintToChat(client, "\x04[SM_JailAwards] \x05This is only for Ts");
        return;
    }

    DID(client);
    PrintToChat(client, "\x04[SM_JailAwards] \x05Your credits: %i", g_iCredits[client]);
}

And recompile

EGood 06-28-2012 22:04

Re: [CS:S] Jail Awards with credits system
 
Quote:

Originally Posted by Franc1sco (Post 1738153)
Change this

Code:

public Action:DOMenu(client,args)
{
    DID(client);
    PrintToChat(client, "\x04[SM_JailAwards] \x05Your credits: %i", g_iCredits[client]);
}

For this

Code:

public Action:DOMenu(client,args)
{
    if(GetClientTeam(client) != 2)
    {
        PrintToChat(client, "\x04[SM_JailAwards] \x05This is only for Ts");
        return;
    }

    DID(client);
    PrintToChat(client, "\x04[SM_JailAwards] \x05Your credits: %i", g_iCredits[client]);
}

And recompile

ok thanks

lordloss 07-09-2012 14:47

Re: [CS:S] Jail Awards with credits system
 
fail to compile

030Maric 07-10-2012 04:51

Re: [CS:S] Jail Awards with credits system
 
NIce plugin..

Thank you!!

thecrew 11-18-2012 23:50

Re: [CS:S] Jail Awards with credits system
 
Quote:

Originally Posted by Franc1sco (Post 1738153)
Change this

Code:

public Action:DOMenu(client,args)
{
    DID(client);
    PrintToChat(client, "\x04[SM_JailAwards] \x05Your credits: %i", g_iCredits[client]);
}

For this

Code:

public Action:DOMenu(client,args)
{
    if(GetClientTeam(client) != 2)
    {
        PrintToChat(client, "\x04[SM_JailAwards] \x05This is only for Ts");
        return;
    }

    DID(client);
    PrintToChat(client, "\x04[SM_JailAwards] \x05Your credits: %i", g_iCredits[client]);
}

And recompile

I don't know where the .sp file is >.<

Franc1sco 11-19-2012 13:16

Re: [CS:S] Jail Awards with credits system
 
Quote:

Originally Posted by thecrew (Post 1840311)
I don't know where the .sp file is >.<

Get sp file and modify it
https://forums.alliedmods.net/attach...4&d=1324920231


Recompile, you can use this:
https://forums.alliedmods.net/showth...52#post1799552

Franc1sco 01-03-2013 13:14

Re: [CS:S] Jail Awards with credits system v1.1
 
New version 1.1

-Now credits can be saved
-New cvar:
Code:

awards_credits_save 1 // enable or disable that credits can be saved

Download in first post

RedSword 01-03-2013 15:08

Re: [CS:S] Jail Awards with credits system v1.1
 
Hi there,

the following should be changed for approval :
  • Your code is prone to error. i.e. calling "sm_credits" from server console. It seems to be the case for almost all your commands.
  • While your "sm_awards" currently produce an error while trying to PrintToClient to the server, it does send a menu to the server just before (L213 / L297). While this doesn't produce a crash or an error, it is an unwanted behaviour (I did file a bug report on this).
  • You load "common.phrases", but there is no %t/%T in all your code !

Beside, you should also remove FCVAR_REPLICATED, as this can produce console error for the client.

Other than that, I don't see any real problem.

Franc1sco 01-03-2013 16:17

Re: [CS:S] Jail Awards with credits system v1.1
 
Quote:

Originally Posted by RedSword (Post 1866348)
Hi there,

the following should be changed for approval :
  • Your code is prone to error. i.e. calling "sm_credits" from server console. It seems to be the case for almost all your commands.
  • While your "sm_awards" currently produce an error while trying to PrintToClient to the server, it does send a menu to the server just before (L213 / L297). While this doesn't produce a crash or an error, it is an unwanted behaviour (I did file a bug report on this).
  • You load "common.phrases", but there is no %t/%T in all your code !

Beside, you should also remove FCVAR_REPLICATED, as this can produce console error for the client.

Other than that, I don't see any real problem.

1. fixed
2. fixed
I added:
PHP Code:

    if(client == 0// if is console
    
{
        
PrintToServer("you need to be ingame for use this"); // reply to console
        
return; // dont continue
    


3. removed
4. removed



--------------------------------------------------------------------

new version 1.2

-bugfixed for approval

RedSword 01-03-2013 16:48

Re: [CS:S] Jail Awards with credits system v1.2
 
It is still possible to get an error using sm_setcredits from server console.

EDIT : It would possible by the way to use "Command is in-game only" from common.phrases, rather than creating your own phrase, that way your plugin is (partially) multilingual.

Franc1sco 01-03-2013 16:52

Re: [CS:S] Jail Awards with credits system v1.2
 
Quote:

Originally Posted by RedSword (Post 1866414)
It is still possible to get an error using sm_setcredits from server console.

ups ok fixed

RedSword 01-03-2013 16:54

Re: [CS:S] Jail Awards with credits system v1.2
 
Approved.

Franc1sco 01-03-2013 17:05

Re: [CS:S] Jail Awards with credits system v1.2
 
Quote:

Originally Posted by RedSword (Post 1866414)
EDIT : It would possible by the way to use "Command is in-game only" from common.phrases, rather than creating your own phrase, that way your plugin is (partially) multilingual.

Added.


Quote:

Originally Posted by RedSword (Post 1866422)
Approved.

ok thanks

healasuk 01-04-2013 21:28

Re: [CS:S] Jail Awards with credits system v1.2
 
How do you edit the amount of credits that is required to buy a certain award?

Franc1sco 01-04-2013 21:29

Re: [CS:S] Jail Awards with credits system v1.2
 
Quote:

Originally Posted by healasuk (Post 1867249)
How do you edit the amount of credits that is required to buy a certain award?

Soon I will add cvars for it

healasuk 01-05-2013 23:44

Re: [CS:S] Jail Awards with credits system v1.2
 
I'll be waiting for the cvars to be added

sjvcs 01-06-2013 11:19

Re: [CS:S] Jail Awards with credits system v1.2
 
hello, do it to the T and CT are different credits ..
I think it would be good

Ceifador 01-27-2013 13:34

Re: [CS:S] Jail Awards with credits system v1.2
 
Possible allow to only terrorist use the system?

Franc1sco 01-27-2013 13:37

Re: [CS:S] Jail Awards with credits system v1.2
 
Quote:

Originally Posted by Ceifador (Post 1881784)
Possible allow to only terrorist use the system?

Yes sure -> https://forums.alliedmods.net/showth...53#post1738153

Ceifador 01-27-2013 13:49

Re: [CS:S] Jail Awards with credits system v1.2
 
Quote:

Originally Posted by Franc1sco (Post 1881786)


Oh, Thanks. And its possible change prize of awards/disable awards?

Cherzo 02-11-2013 12:45

Re: [CS:S] Jail Awards with credits system v1.2
 
Hey, i have a Problem.
The credits will disappear after a few laps.

Can you fix this ?

seupoj 05-29-2013 10:38

Re: [CS:S] Jail Awards with credits system v1.2
 
Can this plugin be used in tf2 if no then is there a way to convert it

Devoo 06-25-2013 22:31

Re: [CS:S] Jail Awards with credits system v1.2
 
Quote:

Originally Posted by Franc1sco (Post 1881786)

Great idea: Can you make it so credits are given for playing a certain time? i.e every 5 min game time give 1 credit. That would be the greatest if you could! if you can just give me the code and where to put it that'd be great lol.


Or if not, can you make it so only T's are able to get credits when they kill cts? Cause that fix you did makes it only so T's can purchase things but cts still get credits for killing. Thank you!!

GREAT PLUGIN BTW!
(preferably first one)

Mickey94 07-31-2013 08:12

Re: [CS:S] Jail Awards with credits system v1.2
 
hi fransisco,

When u will add the news cvars and the news version ?
can you do a limite for the revive pls ?

Mickey

tumtum 12-20-2013 06:54

Re: [CS:S] Jail Awards with credits system v1.2
 
Franc1sco:

Fixed

Tum

2NASTY4U 03-31-2014 19:20

Re: [CS:S] Jail Awards with credits system v1.2
 
2 Attachment(s)
I added a logmessage for sm_setcredits so server owner can check if admins are abuse this command.

I fixed an error that now spectators can't revive anymore. On many servers with this plugin there are too many fuckers who revive as spectator, fly through walls and drop weapons at terrorists.

Feel free to use it.

PusseG 01-30-2015 13:00

Re: [CS:S] Jail Awards with credits system v1.2
 
Did it work in cs:go?


All times are GMT -4. The time now is 14:29.

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