AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Gravity buy error (https://forums.alliedmods.net/showthread.php?t=126335)

SaM.ThE.MaN 05-08-2010 10:20

Gravity buy error
 
Hi there ,

I am trying to re-build a plugin that when you type /buy_fly you get 0.35 gravity.

Features:
costs 5000$ (Done)
gravity = 0.35 (Done)
Time set to 10 seconds (Need help)

When even i try to compile it gives me an error:
error 001: expected token: "}", but found "-end of file-"

I can see the error but idk how to fix it,

Quote:

#include <amxmodx>
#include <cstrike>
#include <fun>

#define PLUGIN "Gravity Plugins"
#define VERSION "0.1"
#define AUTHOR "SaMThEMaN"

new plugin_on
new price

public plugin_init()

{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /Buy_fly", "Gravity")

plugin_on = register_cvar("amx_tutorial_plugin", "1")
price = register_cvar("amx_tutorial_price", "100")

}

public Gravity(id)
{

new money = cs_get_user_money(id)

if (get_pcvar_num(plugin_on) == 1)

{

if (money >= get_pcvar_num(price))
}

{
set_user_health(id, 5000)

set_user_gravity(id,0.35)

client_print(id, print_chat,"You just purchased 300 Gravity with 10,000 $")
}

else
{
client_print(id, print_chat,"Not enough money to purchase Gravity")
}
}
}

Ryokin 05-08-2010 10:21

Re: Gravity buy error
 
non-steam noob lol

SaM.ThE.MaN 05-08-2010 10:26

Re: Gravity buy error
 
#Fixed
Sorry i fixed it ,
#Request close

SaM.ThE.MaN 05-08-2010 12:15

Re: Gravity buy error
 
Before closing how to time it, like when i buy 5000 hp and 0.35 gravity , i want it to last for 10 seconds, Am i supposed to use this function : http://www.amxmodx.org/funcwiki.php?go=func&id=1169


All times are GMT -4. The time now is 03:40.

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