Raised This Month: $32 Target: $400
 8% 

RPG mod by Sylwester


Post New Thread Reply   
 
Thread Tools Display Modes
MmikiM
Senior Member
Join Date: Nov 2006
Location: Poland
Old 06-22-2009 , 11:13   Re: RPG mod by Sylwester
Reply With Quote #31

PHP Code:
public player_PreThink(id){
static 
Float:ftmpFloat:angle[3], sumss2
if(pev(idpev_button)&IN_JUMP && !(pev(idpev_oldbuttons)&IN_JUMP)
&& 
pev(idpev_flags)&FL_ONGROUND){
g_p_jump[id] = true
}

if(
is_user_alive(id)){
pev(idpev_fuser2ftmp)
ftmp -= 0.001*g_p_upg[id][UPG_LJ]*g_p_upg[id][UPG_LJ]*ftmp
if(ftmp<0.0)
ftmp=0.0

if(g_c_ice[id]>|| g_c_frost[id]>0){
pev(idpev_v_angleangle)
if(
g_c_ice[id]>0){
ftmp 1000.0*sqroot(g_c_ice[id]-1)
2*sqroot(g_c_ice[id])
s21
sum 
s+s2
}else{
ftmp 500.0
3
s2 
2
sum 
s+s2
}
g_p_angle[id][0] = g_p_angle[id][0]*s/sum angle[0]*s2/sum
if(angle[1]<-90.0 && g_p_angle[id][1]>90.0)
g_p_angle[id][1] = (g_p_angle[id][1]-360.0)*s/sum angle[1]*s2/sum
else if(angle[1]>90.0 && g_p_angle[id][1]<-90.0)
g_p_angle[id][1] = (g_p_angle[id][1]+360.0)*s/sum angle[1]*s2/sum
else
g_p_angle[id][1] = g_p_angle[id][1]*s/sum angle[1]*s2/sum

if(g_p_angle[id][1]<-180.0)
g_p_angle[id][1] += 360.0
else if(g_p_angle[id][1]>180.0)
g_p_angle[id][1] -= 360.0

set_pev
(idpev_anglesg_p_angle[id])
set_pev(idpev_fixangle1)
}
set_pev(idpev_fuser2ftmp)
}
return 
FMRES_IGNORED

Somewhere here
__________________


Projects:
Zombie Elite - Technical: 100% Looking for models and sounds...
CS:Source Zombie -
Work in progress...
MmikiM is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-22-2009 , 12:04   Re: RPG mod by Sylwester
Reply With Quote #32

As I said before I was unable to reproduce that problem on my server. PM me with your server ip so I can see it.
__________________
Impossible is Nothing
Sylwester is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-22-2009 , 14:57   Re: RPG mod by Sylwester
Reply With Quote #33

The problem has been solved. It has only occurred on certain NON-STEAM server version, so I'm not going to add fix in plugin code. The bug causes player to teleport to origin {0,0,0} when pressing jump while player is in air and his horizontal velocity is 0.
To fix it you need to find in player_PostThink function:
PHP Code:
set_pev(idpev_velocityvelocity[id]) 
and replace it with:
PHP Code:
if(velocity[id][0] < 2000.0 && velocity[id][0] > -2000.0
&& velocity[id][1] < 2000.0 && velocity[id][1] > -2000.0)
    
set_pev(idpev_velocityvelocity[id]) 
__________________
Impossible is Nothing
Sylwester is offline
MmikiM
Senior Member
Join Date: Nov 2006
Location: Poland
Old 06-22-2009 , 15:22   Re: RPG mod by Sylwester
Reply With Quote #34

Thanks for help!
__________________


Projects:
Zombie Elite - Technical: 100% Looking for models and sounds...
CS:Source Zombie -
Work in progress...
MmikiM is offline
orange
Senior Member
Join Date: Dec 2005
Old 06-23-2009 , 01:10   Re: RPG mod by Sylwester
Reply With Quote #35

Any Sqlite or Mysql support going to be added ?
__________________
orange is offline
Old 06-23-2009, 02:35
roflmao456
This message has been deleted by roflmao456. Reason: meh
MmikiM
Senior Member
Join Date: Nov 2006
Location: Poland
Old 06-23-2009 , 12:34   Re: RPG mod by Sylwester
Reply With Quote #36

Bug

When server crash with playing players then everybody are losing all lvls and starting with 1 lvl ;/
__________________


Projects:
Zombie Elite - Technical: 100% Looking for models and sounds...
CS:Source Zombie -
Work in progress...
MmikiM is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-23-2009 , 20:14   Re: RPG mod by Sylwester
Reply With Quote #37

Well, currently player data is saved only on client disconnect and mapchange, so if server crashes, then player will lose xp gained since last connect, but he still should have his old xp so it's not lvl 1...

I'm going to add frequent data saving in next version, so this problem will be almost gone...

Quote:
Originally Posted by orange View Post
Any Sqlite or Mysql support going to be added ?
Soon. I've just finished adding mysql support, but I want to add few more things and test it before releasing.
__________________
Impossible is Nothing
Sylwester is offline
mateo10
Veteran Member
Join Date: Jan 2006
Old 06-23-2009 , 23:37   Re: RPG mod by Sylwester
Reply With Quote #38

I wish you the best of luck, if you want I can put a link to this in the old thread.

Stopped scripting a long while ago due to lack of interest / studying.
mateo10 is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-26-2009 , 17:38   Re: RPG mod by Sylwester
Reply With Quote #39

Thanks, that would be nice, since some users may still visit your thread looking for updates

I just released new version v1.0b3. I hope I didn't make any fatal mistakes in the code

Here are changes:
Code:
1.0b3 (26 June 2009):
- added MySql support (using sqlx module)
- added bots support (start lvl, data saving, buying upgrades)
- added settings menu
- modified login info menu
- added cvars:
        rpgm_savedb
        rpgm_frequent_save
        rpgm_start_lvl
        rpgm_in_team
        rpgm_def_upgrades
        rpgm_bot_start_lvl
        rpgm_bot_savedata
        rpgm_bot_buy_upgs
        rpgm_bot_def_upgrades
        rpgm_sql_host
        rpgm_sql_user
        rpgm_sql_pass
        rpgm_sql_db
        rpgm_user_control
 - added commands:
        amx_rpg_lvl
        amx_rpg_drop_upgs
        amx_rpg_set_upgs
        amx_rpg_global_reset
- removed cvar rpgm_start_cr

I removed rpgm_start_cr cvar. The only way to give player credits is to change his level. If you force player to buy upgrades using command or cvar, then his level will be adjusted if necessary. Also, now players will receive more xp for killing/damaging opponents with higher levels.
__________________
Impossible is Nothing
Sylwester is offline
MmikiM
Senior Member
Join Date: Nov 2006
Location: Poland
Old 06-27-2009 , 08:29   Re: RPG mod by Sylwester
Reply With Quote #40

Thanks a lot. I waiting for it ;P
__________________


Projects:
Zombie Elite - Technical: 100% Looking for models and sounds...
CS:Source Zombie -
Work in progress...
MmikiM is offline
Reply


Thread Tools
Display Modes

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 13:33.


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