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

Need help with script


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-12-2004 , 11:20   Need help with script
#1

I just started using AMXX and I decided to make a test plugin. Im new to the AMXX natives, so im getting errors. Heres the code:

Code:
/* *   Created by ashade * *   Commands: * *   say /checkpoint will save your coordinates (x,y,z) into a 3d array *   say /gocheck will teleport you to your checkpoint *   say /stuck will destuck you if you get stuck due to a checkpoint *   say /god will give you godmode * *   Information: * *   I designed this coding for fun use during a kz (<a href="http://www.kreedz.com" target="_blank" rel="nofollow noopener">www.kreedz.com</a>) map. *   The origanol code is from Asskicr for he inspired me to try and make *   this coding.  IMPORTANT: IF YOU CHECKPOINT CLOSE TO A WALL YOU MAY GET *   STUCK, HENCE THE /STUCK COMMAND.  When you enter godmode will be enabled *   on connect. * *   Have fun and happy climbing! */ /////////////////////// #include <amxmodx> #include <amxmisc> /////////////////////// new CheckOrigin[33][3] new bool:checked[33] new OldOrigin[33][3] /////////////////////// public god(id) {     if(get_cvar_num("sv_kreedz")==0)     {     return PLUGIN_HANDLED     }     if(is_user_alive(id)==1)     {     set_user_godmode(id,1)     client_print(id,print_chat,"[AMXX] Godmode enabled!")     } } public check(id) {     if(get_cvar_num("sv_kreedz")==0)     {         return PLUGIN_HANDLED         }     if(is_user_alive(id)==1)       if(!checked[id])       checked[id] = true     get_user_origin(id, CheckOrigin[id])     client_print(id,print_chat,"[AMXX] Checkpoint saved!")     return PLUGIN_HANDLED } public gocheck(id) { if(get_cvar_num("sv_kreedz")==0)     {     return PLUGIN_HANDLED     } if(!checked[id]) {     client_print(id,print_chat,"[AMXX] You must set an origin 1st using say /checkpoint")     return PLUGIN_HANDLED } new Origin[3]; get_user_origin(id,Origin); for(new i=0;i<3;i++)     OldOrigin[id][i] = Origin[i] set_user_origin(id, CheckOrigin[id]) client_print(id,print_chat,"[AMXX] You have been teleported to your checkpoint") return PLUGIN_HANDLED } public stuck(id) { if(get_cvar_num("sv_kreedz")==0)     {     return PLUGIN_HANDLED     }     set_user_origin(id, OldOrigin[id])     client_print(id,print_chat,"[AMXX] You have been teleported to your last checkpoint to be unstuck")     return PLUGIN_HANDLED } public plugin_init() {    register_plugin("kz_allinone","1.0","ashade")    register_cvar("sv_kreedz","1")    register_clcmd("say /god","god",0,": will give someone godmode")    register_clcmd("say /checkpoint","check",0,": Will save users origin")    register_clcmd("say /gocheck","gocheck",0,": will take user to checkpoint")    register_clcmd("say /stuck","stuck",0,": de stuck ya")    return PLUGIN_CONTINUE }

whats the deal?
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-13-2004 , 01:42   Isnt this a support forum?
#2

I thought this was a help forum, the problem is, no one responds to me....
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
[RED-Designs]
Senior Member
Join Date: Mar 2004
Location: .us
Old 03-13-2004 , 01:49  
#3

First off, you need to tell us what these "errors" are.

Second, this isnt 100% active yet, so just wait longer and something may happen.
__________________
.My personal Blog
."If the country were open on its borders, new
forms would certainly immigrate, and this also
would seriously disturb the relations of some
of the former inhabitants." - Charles Darwin
[RED-Designs] is offline
Send a message via AIM to [RED-Designs] Send a message via MSN to [RED-Designs] Send a message via Yahoo to [RED-Designs]
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-13-2004 , 02:44   One problem
#4

I cant see the errors... when it compiles, all it said was 3 errors were found, it didnt say what line or anything
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
BAILOPAN
Join Date: Jan 2004
Old 03-13-2004 , 03:22  
#5

Follow the advanced compiling directions in the AMX Mod X documentation.
__________________
egg
BAILOPAN is offline
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-13-2004 , 03:39   Errors
#6

Here ya Go the Errors....
Code:
Small compiler 2.4              Copyright (c) 1997-2003, ITB CompuPhase test.sma(38) : error 017: undefined symbol "set_user_godmode" test.sma(41) : warning 209: function "god" should return a value test.sma(72) : error 017: undefined symbol "set_user_origin" test.sma(82) : warning 217: loose indentation test.sma(82) : error 017: undefined symbol "set_user_origin" 3 Errors.
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
BAILOPAN
Join Date: Jan 2004
Old 03-13-2004 , 03:52  
#7

#include <fun> ?
__________________
egg
BAILOPAN is offline
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 03-13-2004 , 04:35  
#8

lol yea include fun would probably fix it
QwertyAccess is offline
[RED-Designs]
Senior Member
Join Date: Mar 2004
Location: .us
Old 03-13-2004 , 06:01  
#9

Quote:
Originally Posted by BAILOPAN
#include <fun> ?
Edit - set_user_gravity(index, Float:gravity = 1.0) was moved to "fun"
__________________
.My personal Blog
."If the country were open on its borders, new
forms would certainly immigrate, and this also
would seriously disturb the relations of some
of the former inhabitants." - Charles Darwin
[RED-Designs] is offline
Send a message via AIM to [RED-Designs] Send a message via MSN to [RED-Designs] Send a message via Yahoo to [RED-Designs]
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 03-13-2004 , 06:30  
#10

well it makes sense for stuff like that to be in fun
QwertyAccess is offline
Closed Thread



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 06:01.


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