Raised This Month: $ Target: $400
 0% 

My vary first plugin with loads of errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
svendude
Member
Join Date: Aug 2004
Old 12-23-2004 , 16:46   My vary first plugin with loads of errors
Reply With Quote #1

Ok, I'm trying to make a plugin where it changes 1 persons gravity (don't tell me it's already made ok, i'm trying to learn ) but i got loads of errors. Here's the code:

Code:
/* Made by fragers (also known as carl or svendude) Use at your own risk! This is my first script so I am not responsible if this script makes your computer blow up. Author: Svendudes Version: 1.0 date started: December 23, 2004 */ #include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() {     register_plugin("fun gravity","1.0","Svendude")     register_concmd("amx_gravity","funcgravity", ADMIN_BAN," : Changes the gravity of a player")     } public funcgravity(id,level,cid) {     if(!cmd_access(id,level,cid,1)) {         return PLUGIN_HANDLED         }         Float: set_user_gravity ( id, [ Float:gravity ] )         return PLUGIN_HANDLED }

I know it has something to do with the set_user_gravity line though. What is the right way to do what i'm trying to do (sorry if i sound mean i'm in kinda a rush
__________________
Sorry for being gone so long
svendude is offline
Send a message via Yahoo to svendude
f1del1ty.oXi
Veteran Member
Join Date: Nov 2004
Old 12-23-2004 , 16:48  
Reply With Quote #2

Scripting help forum fo a reason you know.
f1del1ty.oXi is offline
svendude
Member
Join Date: Aug 2004
Old 12-23-2004 , 17:03  
Reply With Quote #3

THE HELL~!? I thought i did post in the scripting help

can an admin move it to the right spot?

:edit 1: Thank you
__________________
Sorry for being gone so long
svendude is offline
Send a message via Yahoo to svendude
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 12-23-2004 , 20:20  
Reply With Quote #4

change Float: set_user_gravity ( id, [ Float:gravity ] )

to

set_user_gravity ( id, 0.3)
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
svendude
Member
Join Date: Aug 2004
Old 12-23-2004 , 20:35  
Reply With Quote #5

no float?
__________________
Sorry for being gone so long
svendude is offline
Send a message via Yahoo to svendude
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 12-23-2004 , 20:41  
Reply With Quote #6

Or just use this:

Code:
/* Made by fragers (also known as carl or svendude) Use at your own risk! This is my first script so I am not responsible if this script makes your computer blow up. Author: Svendudes Version: 1.0 date started: December 23, 2004 */ #include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() {     register_plugin("fun gravity","1.0","Svendude")     register_concmd("amx_gravity","funcgravity", ADMIN_BAN," : Changes the gravity of a player")     } public funcgravity(id,level,cid) {             if(!cmd_access(id,level,cid,1)){         console_print(id, "You have no access to that command")         return PLUGIN_HANDLED     }     new arg[5]     read_argv(1, arg, 4)     set_user_gravity(id, floatstr(arg))     return PLUGIN_HANDLED }

to use do like

amx_gravity 1.0 (normal)

amx_gravity 0.3
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-23-2004 , 21:00  
Reply With Quote #7

The "You have no access to this command" is automatically printed when you use the cmd_access function.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
mobytoss
Senior Member
Join Date: Jun 2004
Location: On my TS server
Old 12-24-2004 , 16:45  
Reply With Quote #8

Ah, I had the same problem as this guy when I tried making the same plugin. I never could work out what to do :0/

I'm gonna see if I can get it working using pimpdaddy's method.
__________________
"As we know, There are known knowns. There are things we know we know. We also know There are known unknowns. That is to say We know there are some things We do not know. But there are also unknown unknowns, The ones we don't know We don't know."
mobytoss 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 19:17.


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