Primero que nada, me presento a todo Allied Modders. Me llamo Rodrigo, tengo 15 años. Aprendí lo básico de Pawn hace 3 semanas y con eso me conformo. Con ayuda de un amigo realice este plugin. ¿Que es lo que hace? Básicamente como su nombre lo indica, Grenade_Game significa ''Juego de Granada''. ¿De que consta?
- Al comenzar la ronda se les quitan todas las armas a los jugadores y se les da 1 HE y 1 Flash. Al tirar la granada, se respawnea automáticamente, es decir, se te da otra apenas tiras la granada. También, al morir revivís, con lo que el juego se hace mas dinámico y no tan aburrido.
Errores que encuentren me avisan:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#define PLUGIN "Grenade_Game"
#define AUTHOR "VodKa'"
#define VERSION "1.0"
new cvar_active
public plugin_init()
{
register_event("CurWeapon" , "Event_CurWeapon" , "be" , "1=1" );
cvar_active = register_cvar("amx_grenade", "1")
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Killed, "player", "Revivir", 1)
RegisterHam( Ham_Spawn, "player", "Ham_PlayerSpawn" )
}
public Ham_PlayerSpawn(id)
{
strip_user_weapons(id)
}
public Revivir(id)
{
ExecuteHamB(Ham_CS_RoundRespawn, id)
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
}
public Event_CurWeapon( id )
{
if(get_pcvar_num(cvar_active))
{
new he = read_data(2)
if(he == CSW_HEGRENADE && is_user_alive(id))
return PLUGIN_CONTINUE
else
{
set_task(0.1, "he", id)
}
}
else
{
return PLUGIN_CONTINUE;
}
return PLUGIN_HANDLED;
}
public he(id)
{
give_item(id,"weapon_hegrenade")
}