2nd Amxx Plugin

New Member
Joined
Feb 5, 2007
Messages
18
Best answers
0
Here's my second plugin
I made PL saving plugin.. which does the following.
When someone leaves the server it saves his PL and when he comes back he gets his PL back.
PL doesnt Affected by going spector/killing self.
Also the maximum PL you can have is 2bilion it wont save more then that..
Cvar for using is
esf_plsaving 1/0
while activeted is 1 and deactiveted is 0
It's automaticly sets it self to 1 when u start a server...

Also Shiffting between classes will let u keep your PL..
Here's an upload link.. and if you use it please post here with an opinion..
http://rapidshare.com/files/17194395/SavePLPlugin.amxx.html
Here's a link to the source
http://rapidshare.com/files/17199387/SavePLPlugin.sma.html

2nd mirror for the plugin
http://www.xirosima.caucasus.net/download.php?file=054859339a3bdc08e2f00f1fb41084f6
2nd mirror for the source
http://www.xirosima.caucasus.net/download.php?file=214b4471d33caaa381ffcc0455b741e5

Credits: good tutorials and other plugins posted at Amxx mod site which helped me learning as I was looking at thier source..
I was using ESF moudle which can be found on the Amxx site.. if it doesnt work it possible you dont have this moudle...(I think it comes with the full Amxx download in thier site)

Edit: had some problem fixed it now meh.
 
Base belongs to me.
👑 Administrator
🌠 Staff
✔️ HL Verified
🚂 Steam Linked
💎Légéñdārý
Joined
Nov 30, 2002
Messages
10,867
Best answers
0
Location
Netherlands
Sounds good, but can be rather annoying when people join the server having a huge powerlevel.. Which is rather down side about this plugin. Where does it saves in? Vault.ini?
 
New Member
Joined
Feb 5, 2007
Messages
18
Best answers
0
Yeah It's saving to vault.ini.
I know it can be annoying but some people "work" hard for thier PL that's just for fun servers where ppl dont want to lose thier PL.
 

Mog

New Member
Joined
Feb 2, 2002
Messages
541
Best answers
0
Rapidshare never works for me... it always says i'm over dl limit, even though I never use it.
Sounds like a good plugin though. :yes:
 

Mog

New Member
Joined
Feb 2, 2002
Messages
541
Best answers
0
www.amxmodx.org :) ...although I used to be banned there, thanks to the same reason that Rapidshare doesn't work for me...
The IP address that those sites detect for me is the address of an internet gateway used by hundreds of other computers, not just my own.
...which is why it's not really surprising that rapidshare thinks I've exceeded the dl limit after about a minute! :rolleyes:

anyway, i can download from there now... if you can upload plugins there more people will use them too.

I can't think of any simple alternative rapidshare-like upload sites that would work for me...
I normally just create a basic website somewhere and upload my files to it, but that's not as simple or as good as using rapidshare.

EDIT:
nm, that 2nd mirror you added works fine... gonna try it out. :)
 
Active Member
✔️ HL Verified
💻 Oldtimer
Joined
Nov 6, 2004
Messages
3,055
Best answers
0
Location
Round Rock, TX
I haven't coded a plugin for AMXX since 2005, so my Pawn may be a bit rusty. But anyways, here we go:

When I opened it, I immediately noticed this:

Code:
new PLUGIN[]="Save PL"
new AUTHOR[]="ESFnewbie"
new VERSION[]="0.1"
 
public plugin_init()
{
 register_plugin(PLUGIN, VERSION, AUTHOR)
 register_cvar("esf_plsaving","1")
 register_event("ResetHUD","spwancheck","b")
 register_event("DeathMsg","Deathfunc","a")
 register_clcmd("say /savepl","SavePL") //command to save your pl
 register_clcmd("say_team /savepl","SavePL")
 register_clcmd("ascend","PreTransPL")
}
Really, all you need is this:
Code:
public plugin_init()
{
 register_plugin("Save PL", "0.1", "ESFNewbie")
 register_cvar("esf_plsaving","1")
 register_event("ResetHUD","spwancheck","b")
 register_event("DeathMsg","Deathfunc","a")
 register_clcmd("say /savepl","SavePL") //command to save your pl
 register_clcmd("say_team /savepl","SavePL")
 register_clcmd("ascend","PreTransPL")
}
It doesn't make any difference on how the program will perform, but it will make your code look nicer. You should always look for ways to make your code as small as possible.

The second thing I noticed was that I couldn't understand your comments. Seriously dude, if you can code a plugin, you can type in the english language. I'm not flaming, or trying to give you a hard time. I'm just saying, it's easier for others to understand your work if they can understand your comments. This may seem retarded, but this is coming from years of experience in programming.

Third, try to make mininal use of the vault. In this instance, it's alright, since it's only a small script. But if you ever write a larger script, like an EVM-equivelant, then you might want to use SQL instead. It's cleaner, and you don't run the risk of data loss if the server crashes.

That's all for now. I hope I helped. :)
 

Mog

New Member
Joined
Feb 2, 2002
Messages
541
Best answers
0
Works great! Code looks pretty good too. :yes:

I tried to run it on 1.3ob as well, and it obviously didn't work...
(well it didn't getPL or setPL, and it wasn't too keen on android 18 and cpt ginyu... but other than that it worked i guess. :])

About Spunky's suggestions, I think...
-The way you declared plugin name, author and version was better than the "nicer looking" way.
-SQL would definitely be a better option, and shouldn't take long to learn how to use it.
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
Out of curiosity, if I get 4 million pl with Goku, and than I go to cell, does cell now have 4 million pl? Imo, each character should be separate... You should also add something for players who dont want their pl saved, like typing "reset my PL" ingame will reset that persons pl

cool plugin though, great idea
 
New Member
Joined
Oct 21, 2006
Messages
317
Best answers
0
I've always thought an Esf-Rpg plugin would be rather interesting, if a little hard to balance.

For it to work PL would have to be alot harder to earn , and attack values would have to be re-scaled, but it could be very interesting, as long as there's some sort of system to prevent high level players raping the hell out of low level players (Servers with level limits etc)
 
New Member
Joined
Oct 10, 2006
Messages
980
Best answers
0
Location
Australia, NSW, Sydney
NICE WORK :D, Im really impressed with tis Plug-In, reminds me of ET. Good work. To bad our Australian server doesnt run on AMX >_<

Congrats Good wrk.

-GuZzie
 
New Member
Joined
Feb 5, 2007
Messages
18
Best answers
0
Well, yeah I think there are a few ways to make this code smaller and also using SQL would be nice if it had been bigger.
About the comment well english is not my native language so when I put comments most of the time I write it in language which is rather slang (some times with errors but still a sort of slang) but I'll try working on it too.
About the the Author, Version, Etc I think it makes the code look abit better and make it easier to understand.
For Sub I think later I may update the plugin so each class will have diffrent PL saving after I'll work with SQL better.
But for now changing classes will let you keep your PL but I'll add resetpl command or something like that.
Thanks for your comments
 
New Member
✔️ HL Verified
Joined
Feb 18, 2007
Messages
25
Best answers
0
Would it be possible to create a full rpg mod like in counterstrike source?
and with changes like Regen, Health, Speed, Vampire, Power Up Faster
with the leveling system and stuff. And you would start with Melee, ki blast, gen beam, and would need to learn attacks (buy them with rpg creds?)

i know that this would cause spamming but i would love such a plugin
 
Base belongs to me.
👑 Administrator
🌠 Staff
✔️ HL Verified
🚂 Steam Linked
💎Légéñdārý
Joined
Nov 30, 2002
Messages
10,867
Best answers
0
Location
Netherlands
Would it be possible to create a full rpg mod like in counterstrike source?
and with changes like Regen, Health, Speed, Vampire, Power Up Faster
with the leveling system and stuff. And you would start with Melee, ki blast, gen beam, and would need to learn attacks (buy them with rpg creds?)

i know that this would cause spamming but i would love such a plugin
Such plugin already in progress ;).
 
Active Member
💻 Oldtimer
Joined
Nov 18, 2002
Messages
4,201
Best answers
0
though the server should reset the stats... like if the player goes away for a while like 1 hour... and then he comes back playing again, he should get his pl back.

but not like after a month someone comes with 2 billion pl and pwn all by a kamehame ha. Nice plugin!
 

Users who are viewing this thread

Top Bottom