ProKreedz 2.28

Started by nucLeaR
06/04/2010 00:09
Page 5 of 20
kielorz21/04/2010 16:45

hardcopypaste... maybe with some optimizations..

nucLeaR21/04/2010 16:45

Alright, thanks for supporting me.

Also Juice, check PM. I will continue the updates when i arrive home, Monday i guess.

SchlumPF24/04/2010 11:53

http://www.sendspace.com/file/bhrlq7

just had a quick view on your code and commented a few parts. just open the file and search for comments starting with /* and ending with */.

nucLeaR24/04/2010 14:33(edited 24/04/2010 15:45)

Wow, thanks for reviewing the code.

1. I will put the cells up to 33. To be honest i don't really know what's the difference between the numbers in brackets for cells. I really need to read some tutorials for this one. [fixed]

2. The one for delay duck. I've never seen that code. This code is coming from the original ProKreedz version as you might know. If you have a link with connor's code for that would be great :-s [to do]

3. I will delete say_team usage. [fixed]

4.I don't understand why everybody cares about that part of the code. I will not change it since it won't affect the performance of the code. If you will give me an already done code for that part i will replace (or everyone else). Otherwise i will not change it. Sorry, changing is not needed. [n/a]

5.I don't even know why i was setting frags and deaths twice. Now i remember why: it won't work until i use the function twice, don't know the reason. [n/a]

6.I will change that code. I really like switch function :D [fixed]

7. Hook to be added as cheat detection [fixed]

8. Grammatical fail. [fixed]

9. It was my first stock usage. Probably i will replace thetime() with get_gametime() in the entire code. [To do or not to do]

10. Nevermind O_x [fixed]

Also, In my opinion i should delete admin_teleport and admin_gravity since no one is using them.
Going to fix some of the tips you gave in the current version.

Thanks you again for reading the code.

irQuaker24/04/2010 17:00(edited 24/04/2010 17:04)

1. [blockquote]http://wiki.amxmodx.org/Optimizing_Plugins_(AMX_Mod_X_Scripting)#Don.27t_Re-index_Arrays[/blockquote]

2.
set_pev( id, pev_flags, pev( id, pev_flags ) | FL_DUCKING );
There's no need for delay_duck, just set user flags (works for me).
NOTE: set_task cannot be less then 0.1, so 0.01 is same as 0.1.

4. Arrays... Use them!

5. OMFG

6. goto 4.

8. It would be even better to add ML support.

SchlumPF24/04/2010 18:24

2. pev_flags + pev_size. pev_flags will not affect the player. the engine will think that the player is ducking for a single frame but will not change its size. hence the player will still be able to stuck.

4) a good plugin has alwas a well looking code

5) delaying the code may help

6) does not require arrays. actually arrays would make the code worse at this point.

8) tbh, ml sucks ^^ adding ml it something no plugin needs so nuclear should start thinking about it when he has finished everything else. furthermore this community is english speaking. hence everybody who is downloading the plugin should be able to speak and understand english.

irQuaker24/04/2010 19:06(edited 24/04/2010 19:07)

You're right about weapon speed. He can hook to CurWeapon event and get max speed. And about ML, yes it's better to leave it for the end. It is very simple to implement. I don't know what's the problem with it.

Anyway, this is how my plugin works and no one ever got stucked.
http://www.sendspace.com/file/qchzfy
Pls, show me when and how will player get stucked.

nucLeaR24/04/2010 22:12

Ok so.

2. SchlumPF, send me please the code you're talking about. :-s
4. Will try to do it better, even though my mentality works like this "2+2 is 4 even thought 3+1 and square 16 are still 4". So if the cheap one works, why should i make it harder, or let's say "better looking"? :D
5. Adding twice frags won't damage.
6. Fixed somehow
8. No i won't

SchlumPF26/04/2010 11:41

4. because its the same, just better lokking and easier to edit. btw, square 16 -> 16^2 != 4 ;D you meant squareROOT

5. adding twice frags is unnecessary

2. if i remember correctly it was this:

set_pev( plr, pev_flags, pev( plr, pev_flags ) | FL_DUCKING );
engfunc( EngFunc_SetSize, { -16.0, -16.0, -18.0 }, { 16.0, 16.0, 18.0 } );

the problem when using pev_flags only is, that the engine will set you ducking in the _next_ frame. the engfunc_size thingy is doing in the current frame.

nucLeaR26/04/2010 12:35

2. Gonna try that after i come from school

4. yeah square 16 is +/- 4. Still i won't change it until i get the code xD. It's just the way i am.

5. Actually it is. After you die, you get -1 frags and 0 deaths. I think the engine adds the suicide down-frag after the plugin will respawn the player.
As you said delaying the code might help, also setting twice players' frags will not break anything.

I must go to school now, going try the #2 code later.


Also I'm a bit stuck with /pause function.
I can't stop the Hud message going on. It will show me the uptime of server if i /pause. If i /unpause i will get the good time, but it looks ugly if you pause to show you the uptime. I miss-mathed it a little.
And an ugly bug if you are in pause and you start again timer, your HUD time will be -1 minute and xx. If i /pause, i will get the uptime, if i /unpause again still i get - 1 minute and xx and it's downgrading constantly. I will make players unable to go to start location if they paused,, the only way. Also hook shouldn't work if you are paused, because you can go to start button and use the ugly -1 minute bug :(

SchlumPF26/04/2010 13:14

you still dont understand...

square 16 -> 16^2 = 196
you should have written squareROOT 16 ->
sqrt(16) = abs(4) -> -4; +4

nucLeaR26/04/2010 19:22

Oh, i got it now.

repingayok27/04/2010 08:03(edited 27/04/2010 08:10)

Bug with scout.
I use prokreedz_v2.0m and default kreedz.cfg. I taken to pro15 when:

I say /scout - I get scout. Than I drop it and push start button. Than I up from the ground scout, pass map with it and before the finish I drop scout and only than push finish button. And I taken to pro15 (of course if I don't use gochecks).

P.S.: I don't test second option when player push start button, than say /scout and before finish drop scout and push finish button

P.S.2: Why if player say /scout he can't use usp or knife ? And if player drop scout, in his hands there's nothing at all =)

nucLeaR27/04/2010 17:41

Use kz_drop_weapons 0 for Public servers.

Use 1 only for recording demos.

doktor27/04/2010 23:51(edited 27/04/2010 23:55)

2. force duck part :

ForceUserDuck(id)
{
static const Float:VEC_DUCK_HULL_MIN[3] = {-16.0, -16.0, -18.0 }
static const Float:VEC_DUCK_HULL_MAX[3] = { 16.0, 16.0, 32.0 }
//static const Float:VEC_DUCK_VIEW[3] = { 0.0, 0.0, 12.0 }
set_pev(id, pev_flags, pev(id, pev_flags) | FL_DUCKING)
engfunc(EngFunc_SetSize, id, VEC_DUCK_HULL_MIN, VEC_DUCK_HULL_MAX)
//set_pev(id, pev_view_ofs, VEC_DUCK_VIEW)
}


Commented part should be optional.


5. set_user_frags, or set_pev(id, pev_frags doesn't update the scoreboard
cs_set_user_deaths updates the scoreboard.

So use them in this order.

irQuaker28/04/2010 00:17(edited 28/04/2010 00:20)

nvm

repingayok29/04/2010 07:17

nucLeaR, can you make top15 like in kz_multiplugin ?

nucLeaR29/04/2010 12:53

you mean what. SQL Support ?
I'm trying to do a special version including SQL.

Also i will try to change the design of the top15 (looks ugly) and make it support txt file , not vault which suck in my opinion :)

doktor29/04/2010 13:43

Originally posted by nucLeaR
you mean what. SQL Support ?
I'm trying to do a special version including SQL.

Also i will try to change the design of the top15 (looks ugly) and make it support txt file , not vault which suck in my opinion :)


nvault should be faster than .txt file.

Anyway, you should use sql and let server admins choose affinity, aka if ranks are stored on a mysql or on the server.

nucLeaR29/04/2010 13:59

deleting a line from .vault files will make a copy of the next data.

Meaning if my rank is 4 and i go to rank 2 i must delete my old 4th rank. Deleting it will make a copy of #5 rank to #4 rank. I will be same name/time on #4 and #5. Is there any way i can fix this? Is my problem or the vault system is doing it?

Page 5 of 20

Please log in to post replies.