I'm in a logic error with those two ones..
I'll try to explain on my plugin..
This is my plugin, it spawns players when they write "/spawn" in say or say_team and if player has enough money for it.
Code:
#include <amxmodx>
#include <cstrike>
new gMoney
#define PLUGIN "Spawn Players With a Command"
#define VERSION "1.0"
#define AUTHOR "Jess"
#define SERVER_INFORMATION "Vengeance"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /spawn", "Event_Spawn")
register_clcmd("say_team /spawn", "Event_Spawn")
gMoney = register_cvar("necessary_money", "10000")
}
public Event_Spawn(id) {
if(is_user_alive(id))
{
client_print_color(id, id, "^04[%s]: ^3You Already Alive, You Can't Spawn Yourself", SERVER_INFORMATION)
return PLUGIN_HANDLED
}
if(!is_user_alive(id))
{
if(cs_get_user_money(id) < get_pcvar_num(gMoney))
{
client_print_color(id, id, "^4[%s]: ^3You Don't Have Enough Money to Spawn Yourself", SERVER_INFORMATION)
return PLUGIN_HANDLED
}
else if(cs_get_user_money(id) >= get_pcvar_num(gMoney))
{
cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(gMoney))
cs_user_spawn(id)
client_print_color(id, id, "^4[%s]: ^3You Have Spawned Yourself!", SERVER_INFORMATION)
}
}
return PLUGIN_HANDLED
}
---
I put the code "return PLUGIN_HANDLED" under this line as you see:
Code:
if(is_user_alive(id))
{
client_print_color(id, id, "^04[%s]: ^3You Already Alive, You Can't Spawn Yourself", SERVER_INFORMATION)
return PLUGIN_HANDLED
}
What does it do in there? Does it stop the task of this line, just that? What there happens if I write "return PLUGIN_CONTINUE" instead of it?
Or.. I put the same return code at the end of "Event_Spawn" Public. What also does it do in there, it stops the plugin when all tasks done, is it right? Can't be sure.