Raised This Month: $ Target: $400
 0% 

i am doing right?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ownedin3d
Senior Member
Join Date: Jul 2011
Old 08-12-2011 , 18:25   Re: i am doing right?
Reply With Quote #3

Quote:
Originally Posted by Diegorkable View Post
Put it in an PHP code, much easier for others to read.

PHP Code:
/*============================================ ================================*/

new const g_item_cost 15 // Cost of Multijump

// Say command through which multijump is bought
new const g_buymultijump_clcmd[] = "say jump"
new const g_multijump_amount // Amount of multijumps given on purchase
new const g_multijump_limit //Max multijumps a human can jump

/*============================================ ================================*/

public plugin_init()
{
register_plugin("[ClanD] Extra Item: Multijump""1.0""Ownedin3d!")
register_clcmd(g_buymultijump_clcmd"hook_say")
}

// Human buys our upgrade, give him some multijumps
public hook_say(id)
{
if (!
is_user_alive(id) || zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_ammo_packs(id) < g_item_cost)
return 
PLUGIN_CONTINUE;

new 
current_multijump pev(idpev_multijumpvalue)
if (
current_multijump >= g_multijump_limit)
{
client_print(idprint_chat"[ClanD] The Maximum Jumps Is 2")
return 
PLUGIN_CONTINUE;
}

set_pev(idpev_multijumpvaluefloat(current_multijump g_multijump_amount))

zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) - g_item_cost)

return 
PLUGIN_HANDLED;

What i Am Doing wrong? :
ownedin3d is offline
 



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 03:29.


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