AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help with script (https://forums.alliedmods.net/showthread.php?t=209)

knekter 03-12-2004 11:20

Need help with script
 
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?

knekter 03-13-2004 01:42

Isnt this a support forum?
 
I thought this was a help forum, the problem is, no one responds to me....

[RED-Designs] 03-13-2004 01:49

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. :D

knekter 03-13-2004 02:44

One problem
 
I cant see the errors... when it compiles, all it said was 3 errors were found, it didnt say what line or anything :cry:

BAILOPAN 03-13-2004 03:22

Follow the advanced compiling directions in the AMX Mod X documentation.

MagicShot 03-13-2004 03:39

Errors
 
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.

BAILOPAN 03-13-2004 03:52

#include <fun> ?

QwertyAccess 03-13-2004 04:35

lol yea include fun would probably fix it

[RED-Designs] 03-13-2004 06:01

Quote:

Originally Posted by BAILOPAN
#include <fun> ?

Edit - set_user_gravity(index, Float:gravity = 1.0) was moved to "fun"

QwertyAccess 03-13-2004 06:30

well it makes sense for stuff like that to be in fun


All times are GMT -4. The time now is 02:13.

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