Hi everybody, It's my first script, so don't call me n00b (I'm a n00b, as you can see, but don't tell me)
Code:
---------------------------------------------------------------------------------
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <dbi>
#include <tsx>
#include <engine>
#include <engine_stocks>
#include <fun>
#include <tsxaddon>
#define PLUGIN "Matrix Phone"
#define VERSION "1.0"
#define AUTHOR "Kuidao Ketemeto"
public plugin_init() {
register_plugin("Matrix Phone", "1.0", "Kuidao Ketemeto")
register_srvcmd("item_mphone","item_mphone")
// Add your code here...
}
// Precaching some stuff
public plugin_precache()
{
precache_sound("items/kuidao/teleport.wav")
}
////////////////////////////////////
// ITEM
///////////////////////////////////
// The Matrix Phone
public item_mphone(id)
{
new origin[3]
new authid[32]
get_user_authid(id,authid,31)
get_user_origin(id,origin)
origin[0] = -326 // X coordinates
origin[1] = 152 // Y coordinates
origin[2] = -25 // Z coordinates
set_user_origin(id,origin) // Moves the player to the location stored in origin
client_cmd(id,"speak ^"items/kuidao/teleport^"")
return PLUGIN_HANDLED
}
-----------------------------------------------------------------------------------
When I compile it, I have 2 warnings in files 41 and 47...
It's a TSRP plugin, workin with Harbu's.
When I use that item in the server, it plays the sound, but doesn't teleport me, in the server console I can see this:
-----------------------------------------------
L 05/05/2006 - 07:56:22: [AMXX] Native error in "get_user_origin" on line 42 (file "matrix_phone.sma").
-----------------------------------------------
Please help me
(I'm Spanish, sorry my english)