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

Shop Plugin buy with XP and get Ammo Packs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 02-18-2018 , 13:02   Shop Plugin buy with XP and get Ammo Packs
Reply With Quote #1

I want to ask can anyone create this shop maybe?

It should be like :

Buy Ammo for XP

Like Command:

shop and /shop

Menu in Red when possible

50 Ammo costs 2000 XP

50 Ammo <-> 2000 XP
100 Ammo <-> 5000 XP
200 Ammo <-> 10000 XP
300 Ammo <-> 20000 XP
500 Ammo <-> 50000 XP
1000 Ammo <-> 100000 XP

It would really greatful when anyone could create that... THX

Last edited by Godofwar; 02-18-2018 at 13:02.
Godofwar is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-18-2018 , 13:45   Re: Shop Plugin buy with XP and get Ammo Packs
Reply With Quote #2

What's the natives? I've never played zombie plague mod...
__________________
Relaxing is offline
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 02-18-2018 , 14:15   Re: Shop Plugin buy with XP and get Ammo Packs
Reply With Quote #3

natives are that:

Code:
// Forward
public OnPowersLoaded(id, condition)
	PowersLoaded[id] = condition
// Native send_unlocks_list
public native_send_unlocks_list(id, list[])
{
	param_convert(2)
	format(UnlocksList[id], 2047, "^n%s", list);
}
// Native: gxm_add_bonus
public native_add_bonus(id, xp, message[])
{
	param_convert(3)
	set_hudmessage(0, 40, 255, 0.50, 0.33, 1, 2.0, 2.0)
	show_hudmessage(id, "+%i %s", xp, message)
	PlayerXp[id] += xp;
	check_level(id)
}
// Native: kill bonus xp and text
public native_add_text(id, xp, kill_message[])
{
	param_convert(3)
	format(KillString[id], 2047, "%s^n+%i %s",KillString[id], xp, kill_message);
	PlayerXp[id] += xp;
	check_level(id)
}
// Native: damage bonus xp and text
public native_add_damage_text(id, xp, kill_message[])
{
	param_convert(3)
	format(DamageString[id], 2047, "%s^n+%i %s",DamageString[id], xp, kill_message);
	PlayerXp[id] += xp;
}
// Native xp enabled
public native_xp_enabled(id, bool:enabled)
{
	XP_Enabled[id] = enabled;
}
// Native: get_user_prestige
public native_get_psw(id, psw[])
{
	param_convert(2) 
	return formatex(psw, 255, "%s", Password[id]) 
}
public native_set_psw(id, psw[])
{
	param_convert(2)
	formatex(Password[id], 255, "%s", psw)
}
// Native: get_xp_loaded
public native_get_xp_loaded(id)
{
	if(PowersLoaded[id] == 0)
		return false;
	return Loaded[id];
	
}
// Native set_xp_loaded
public native_set_xp_loaded(id, bool:set)
	Loaded[id] = set
// Native: check_level_native
public native_check_level_native(id)
{
	check_level(id)
}
// Native: get_user_save_type
public native_get_user_save_type(id)
{
	return g_save_type[id];
}
// Native: set_user_save_type
public native_set_user_save_type(id, amount)
{
	if(amount == 3)
	amount = get_pcvar_num(savexp)
	g_save_type[id] = amount
	PlayerXp[id] = 0
	PlayerPrestige[id] = 0
	PlayerLevel[id] = 0
	LoadLevel(id)
}
// Native: get_user_prestige
public native_get_user_prestige(id)
{
	return PlayerPrestige[id];
}
// Native: get_user_xp
public native_get_user_xp(id)
{
	return PlayerXp[id];
}
// Native: set_user_prestige
public native_set_user_prestige(id, amount)
{
	PlayerPrestige[id] = amount;
	SaveLevel(id)
}
// Native: set_user_xp
public native_set_user_xp(id, amount)
{
	PlayerXp[id] = amount;
	check_level(id)
}
// Native: get_user_level
public native_get_user_level(id)
{
	return PlayerLevel[id];
}
// Native: set_user_xp
public native_set_user_level(id, amount)
{
	PlayerLevel[id] = amount;
}
// Native: Gets user level by Xp
public native_get_user_max_level(id)
{
	return LEVELS[PlayerLevel[id]];
}
Godofwar is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-18-2018 , 15:02   Re: Shop Plugin buy with XP and get Ammo Packs
Reply With Quote #4

Quote:
Originally Posted by mlibre View Post
hello try this
This was one of my requests I did and all you have to do is to make some minor edits into the code.
__________________
Relaxing 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 09:14.


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