Alright, I'm in no way a coder.. but I've been reading around and putting together snippets of codes that are relevant to what I needed to do: Create a entity sprite that when players step on will show them a message/motd/or whatever... i'll figure this out eventually.
Now I have it all put together.. and I was testing it showing a message to the player that touches the entity. It shows "Test test test".. my problem is it keeps spamming it as long as the player stands near the entity.. could somebody help me make it only execute the message once.. until player walks away and comes back to it again.
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_precache()
{
precache_model("sprites/marker.spr")
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_touch("info_ammustore", "player", "Message")
static ent
ent = create_entity("info_target")
if(ent)
{
entity_set_string(ent,EV_SZ_classname,"info_ammustore") // entity classname
entity_set_model(ent,"sprites/marker.spr") // path to the sprite
entity_set_int(ent, EV_INT_solid, SOLID_TRIGGER) // Solid Passable
entity_set_int(ent,EV_INT_movetype,MOVETYPE_NONE) // don't move
set_rendering(ent, kRenderFxNoDissipation, 0,0,0, kRenderGlow, 255)
entity_set_origin(ent,Float:{-530.0,-2663.0,161.0}) // origin
}
}
public Message(pToucher, pTouched)
{
client_print(pTouched, print_chat, "TEst test test"); // testing
}