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

Advanced Surf Points System


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 11-21-2010 , 09:47   Advanced Surf Points System
Reply With Quote #1

Advanced Surf Points System v1.0

This plugin is for servers what running surf mod. Has three plugins included.

1. Main points plugin:

[*] 1 Kill = 1 Point.
[*] One HudMessage will be permanently visible in the left part of the screen with number of points and health.
[*] Players points will be saved by amxmodx module in vault.ini.
[*] Plugin register this natives:
Code:
surf_get_user_points(id); //Get number of points
surf_set_user_points(id, points); //Set exactly points
surf_add_user_points(id, points); //Add player points
surf_del_user_points(id, points); //Delete player points
[*] With this natives, you can make another sub-plugins.

2. Surf buy plugin:

[*] This plugin add a buy menu to players.
[*] This menu will be shown to players, only at 2RD spawn. With other words, the seccond spawn. Not first.
[*] But, will add this commands to open menu: /shop and /menu.
[*] Menu has the next features:

+255 Health
- This will add 255 hp to player. Default cost is: 4 points or 2000$

More speed
- This will increase the player maxspeed. Default cost is: 4 points or 2500$

More gravity
- This will increase the player gravity. Default cost is: 4 points or 2500$

Invisibility
- This will transform player into a hologram. Default cost is: 4 points or 3000$

+12500$ Moneys
- This will add 12500$ to player. Default cost is: 5 points or 10000$

2x Damage
- This will increase the player damage with 50%. Default cost is: 6 points or 8000$

Noclip
- This will add noclip for 20 seconds to player. Default cost is: 12 points or 13000$

Godmode
- This will add godmode for 20 seconds to player. Default cost is: 10 points or 12500$

+1000 Health
- This will add 1000 hp to player. Default cost is: 10 points or 14500$

Unlimited Clip
- This will add unlimited clip to player. Default cost is: 10 points or 14500$

Jail Open
- This will open the jail. Default cost is: 2 points or 2250$

M3 + XM1014
- This will add this two shotguns to player. Default cost is: 14 points or 15000$. Is valable 2 rounds.

Note: First search is points search. If not has enough points, search for moneys. If not has enough points and if not has enough money too plugin will do nothing.

3. Surf manage points:

[*] This add this commands at admins: amx_give_points <name> <points> and amx_remove_points <name> <points>

Multilingual:
English: claudiuhks
Romanian: claudiuhks


Attention! Surf Main Points plugin should to be first writed in plugins.ini!

Attention! addons.zip is completly plugin pack to install!

Image:

[IMG]http://img151.**************/img151/2812/surfski20001.th.png[/IMG]


Attached Files
File Type: sma Get Plugin or Get Source (surf_main_points.sma - 1832 views - 5.0 KB)
File Type: sma Get Plugin or Get Source (surf_buy.sma - 1381 views - 24.7 KB)
File Type: sma Get Plugin or Get Source (surf_points_manager.sma - 1669 views - 3.3 KB)
File Type: zip addons.zip (9.9 KB, 1006 views)
__________________

Last edited by claudiuhks; 11-21-2010 at 13:39. Reason: Removed attachment that contained .amxx file.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
DeLiriuM
Senior Member
Join Date: Dec 2006
Old 11-21-2010 , 10:09   Re: Advanced Surf Points System
Reply With Quote #2

Looks nice. I'll definitely try it ;)

Shouldn't you attach the .sma files?
__________________
DeLiriuM is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 11-21-2010 , 12:02   Re: Advanced Surf Points System
Reply With Quote #3

I'll add but never can download amxx file because alliedmodders compiler hasn't surf.inc file... Only script file, sma extension.

--- edit ---

I added surf.inc to this scripts. Now can download amxx file too from atachements. But, not forget, surf_main_poins should to be first!
__________________

Last edited by claudiuhks; 11-21-2010 at 12:34.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-21-2010 , 13:27   Re: Advanced Surf Points System
Reply With Quote #4

You are not allowed to post .amxx files.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 11-21-2010 , 13:40   Re: Advanced Surf Points System
Reply With Quote #5

Removed
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 11-21-2010 , 14:01   Re: Advanced Surf Points System
Reply With Quote #6

Except for "jail open" (which depends on map) it has nothing to do with surfing, so in my opinion you should remove "surf" from name. If you want to make surf points system then you should grant points for surf achievements.

This system is also not really advanced.

-if you check is_user_alive then you don't need to check is_user_connected
-you should create 1 task and loop through all players to display hud msg rather than creating separate tasks for all players
-
PHP Code:
if (is_user_connected(id) && is_user_alive(id) && (get_user_team(id) == || get_user_team(id) == 2))
{
    
//hud msg for alive players...
}
else
{
    
//hud msg for spectators...

the code in "else" block may also be executed when player is not connected or if he is not spectating anyone (free look)
-you should let server owner change saving method (steamid, name, ip) using cvar, instead of editing code
-in saving and loading functions you could use #if #endif blocks to only format key instead of replicating whole code 3 times.
-there are better ways to save data than vault (nvault, sql)
-if player disconnects from server while connecting then he will probably lose his points
-"client_putinserver and client_authorized are not guaranteed to happen in any particular order.", so you should use client_authorized to load data
-menu handlers could be a lot shorter if you store prices in an array and check them before using switch
-if you can buy $12500 for $10000 then you can get unlimited amount of money
__________________
Impossible is Nothing

Last edited by Sylwester; 11-21-2010 at 14:05.
Sylwester is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 11-21-2010 , 15:27   Re: Advanced Surf Points System
Reply With Quote #7

Man... this plugin is tested, LoadData at client_putinserver function perfectly. And if LoadData is on client_authorized, if server use xredirect, what will happen? Load players points hundreds of times? Will do more lag. Why nvault or sql? Why amxmodx module authors add vault.ini? To use only nvault and mysql?

--- edit ---

Ok, can be used in other game mods, but is recomanded for Surf Mod.
__________________

Last edited by claudiuhks; 11-21-2010 at 15:40.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-21-2010 , 15:46   Re: Advanced Surf Points System
Reply With Quote #8

For those kind of data, use at least nvault.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 11-21-2010 , 15:58   Re: Advanced Surf Points System
Reply With Quote #9

You suggest to use nvault?
But i think is not needed a suplimentary module
__________________

Last edited by claudiuhks; 11-21-2010 at 16:01.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-21-2010 , 16:03   Re: Advanced Surf Points System
Reply With Quote #10

You write about lag, nvault is faster than vault.
sqlite is faster than nvault.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 16:23.


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