Log in

View Full Version : Need help with script


knekter
03-12-2004, 11:20
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:

/*
* 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 (www.kreedz.com) 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
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
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
Here ya Go the Errors....

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
#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

[RED-Designs]
03-13-2004, 06:32
well it makes sense for stuff like that to be in fun

True, but I hadnt even looked in it yet. I was to busy toying around with the new natives :D

QwertyAccess
03-13-2004, 06:34
Have Fun :O i hope there can be a better made night vision on amx mod x though.

MagicShot
03-13-2004, 13:28
]well it makes sense for stuff like that to be in fun

True, but I hadnt even looked in it yet. I was to busy toying around with the new natives :D

I went ahead and printed out all the .inc files to stufy where everythign is at.. I dono but might help you too...

[RED-Designs]
03-13-2004, 13:29
]well it makes sense for stuff like that to be in fun

True, but I hadnt even looked in it yet. I was to busy toying around with the new natives :D

I went ahead and printed out all the .inc files to stufy where everythign is at.. I dono but might help you too...

I am out of paper :P

MagicShot
03-13-2004, 13:38
lol thats funny.. I did mine at work :P

[RED-Designs]
03-13-2004, 13:39
lol thats funny.. I did mine at work :P

I dont work, maybe? Nor even leave this damn house.

MagicShot
03-13-2004, 13:41
]lol thats funny.. I did mine at work :P

I dont work, maybe? Nor even leave this damn house.

we need to find you a girl.. that will keep u busy :P

[RED-Designs]
03-13-2004, 13:44
]lol thats funny.. I did mine at work :P

I dont work, maybe? Nor even leave this damn house.

we need to find you a girl.. that will keep u busy :P

One would hope, girls find me dicusting though.

MagicShot
03-13-2004, 13:45
]]lol thats funny.. I did mine at work :P

I dont work, maybe? Nor even leave this damn house.

we need to find you a girl.. that will keep u busy :P

One would hope, girls find me dicusting though.

Its all inattitude... Trust me I have a girlfriend.. I could have many. infact I have to turn a lot down because I have a girlfriend.. possitive attitude goes along way..

[RED-Designs]
03-13-2004, 13:49
]]lol thats funny.. I did mine at work :P

I dont work, maybe? Nor even leave this damn house.

we need to find you a girl.. that will keep u busy :P

One would hope, girls find me dicusting though.

Its all inattitude... Trust me I have a girlfriend.. I could have many. infact I have to turn a lot down because I have a girlfriend.. possitive attitude goes along way..

Well your probibly no fat short wierdo that thinks in a gothic(NOT the stereotypical version) way. I am not so pleasing to the eyes, I assure you.

tnsk8er27
03-14-2004, 15:05
like he just said its all in aditude!!

[RED-Designs]
03-15-2004, 01:45
like he just said its all in aditude!!

So my angry loner additude doesnt cut it?

MagicShot
03-15-2004, 01:50
]like he just said its all in aditude!!

So my angry loner additude doesnt cut it?

Think Positive.. it helps and have a good averall attitude..

It works.. just takes time for it work show..

Like baby steps if you will.. :D

[RED-Designs]
03-15-2004, 01:51
]like he just said its all in aditude!!

So my angry loner additude doesnt cut it?

Think Positive.. it helps and have a good averall attitude..

It works.. just takes time for it work show..

Like baby steps if you will.. :D

But what if I like how I am and dont want to change? The power of will can be stronger then 100 men.

MagicShot
03-15-2004, 01:59
Than be yourself..

Your will find a girl who likes you for who you are.. not what u look like.. :P

[RED-Designs]
03-15-2004, 02:07
Than be yourself..

Your will find a girl who likes you for who you are.. not what u look like.. :P

True, but that doesnt happen often. The ones that do like me are either bitches or stoned. Like my exgf, she was both.. haha

BTW: could a mod seperate this thread into one thread about this whole "gf additude issue" so the original thread gets cleaned?(I would put the new thread in offtopic)