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

New XP Mod tutorial


Post New Thread Reply   
 
Thread Tools Display Modes
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-29-2010 , 13:10   Re: New XP Mod tutorial
Reply With Quote #191

Quote:
Originally Posted by waluss View Post
Hi all.

I'll be wonder if you want help me with this:

Code:
public zp_round_started(id)
{
new armor = 599;
new health = 399;
new Float:grava = 0.5;

if (PlayerLevel[id] == 6)
{
	set_user_armor(id, armor)
	set_user_gravity(id, grava)
	set_user_health(id, health)
	set_pev(id, pev_maxspeed, 299)
}
Problem is here "set_pev(id, pev_maxspeed, 299)" and why it doesnt work?

I tried with set_user_maxspeed but it doesn't work too.
use fm_set_user_speed..
Code:
fm_set_user_maxspeed(id, 299.0)
don't forget
Code:
#include <fakemeta>
Vechta is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 07-29-2010 , 20:40   Re: New XP Mod tutorial
Reply With Quote #192

Quote:
Originally Posted by Vechta View Post
use fm_set_user_speed..
Code:
fm_set_user_maxspeed(id, 299.0)
don't forget
Code:
#include <fakemeta>
No no no.

Code:
set_pev( id, pev_maxspeed, 299.0 )
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-30-2010 , 03:09   Re: New XP Mod tutorial
Reply With Quote #193

Quote:
Originally Posted by wrecked_ View Post
No no no.

Code:
set_pev( id, pev_maxspeed, 299.0 )
lol, just set .0 ?
Vechta is offline
waluss
Junior Member
Join Date: Jul 2010
Old 07-30-2010 , 04:44   Re: New XP Mod tutorial
Reply With Quote #194

Quote:
Originally Posted by wrecked_
No no no.

Code:
set_pev( id, pev_maxspeed, 299.0 )

lol, just set .0 ?
Thanks for help, but i think that problem is higher, in Zombie plague plugin.

And there my speed is changing for normal when round start.

Can someone help ?

@EDIT ok i do it thanks all for help

I need to use:
- in plugin_init
Code:
register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
- and something like that:
Code:
public fw_PlayerPreThink(id)
{
	if(PlayerLevel[id] >= 4)
		set_pev(id, pev_maxspeed, get_user_maxspeed(id)+13.0)
}

Last edited by waluss; 07-31-2010 at 08:58. Reason: anty double posting
waluss is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 08-01-2010 , 07:32   Re: New XP Mod tutorial
Reply With Quote #195

nice tut..
r14170 is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 08-04-2010 , 02:10   Re: New XP Mod tutorial
Reply With Quote #196

Quote:
Originally Posted by Vechta View Post
lol, just set .0 ?
Yes, to make it a float value.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
t3hNox
Senior Member
Join Date: Oct 2009
Old 08-04-2010 , 05:28   Re: New XP Mod tutorial
Reply With Quote #197

I would appreciate if anyone could show some code examples how to make every class individual levels and experience and how to save and load all the stuff afterwards.

I guess there should be used multidimensional arrays and I have no clue how it can be done (especially saving and loading part). Maybe there is a plugin that has classes, levels and experience and doesn't have very complicated code ?
t3hNox is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 08-04-2010 , 14:35   Re: New XP Mod tutorial
Reply With Quote #198

Quote:
Originally Posted by t3hNox View Post
I would appreciate if anyone could show some code examples how to make every class individual levels and experience and how to save and load all the stuff afterwards.

I guess there should be used multidimensional arrays and I have no clue how it can be done (especially saving and loading part). Maybe there is a plugin that has classes, levels and experience and doesn't have very complicated code ?
Code:
enum Class {     Dog,     Bear,     Cat } enum Data {     Level,     EXP } new pInfo[33][Class][Data] // pInfo now holds each class and the player's Level+EXP with each // pInfo[id][Bear][Level] = Level of the player when his class is Bear // pInfo[id][Cat][EXP] = EXP of the player when his class is Cat

To save, just save each value in a string, then store it in nVault.
Loading will just involve getting the string, parsing it, and assigning each variable (Level+EXP) to the values retrieved from nVault.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
t3hNox
Senior Member
Join Date: Oct 2009
Old 08-05-2010 , 03:42   Re: New XP Mod tutorial
Reply With Quote #199

Thanks wrecked_ !

About that saving, did you mean this (example for one class) ?
PHP Code:
pInfo[id][Cat][Level] = pCatLevel
pInfo
[id][Cat][EXP] = pCatEXP 


And a quick question. Can I set some abilities to a player according to his level in this way?
PHP Code:
switch(pInfo[id][Cat][Level])
{
        case 
1//if he has 1st level
        
case 2//if 2nd
        
case 3//if 3rd
        
default: //if 0? "default" in this case will be 0 ?

t3hNox is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 08-05-2010 , 04:07   Re: New XP Mod tutorial
Reply With Quote #200

In your case, default is called when his level is not 1, 2 or 3.
__________________
You can do anything you set your mind to, man.

Devil259 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 21:39.


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