Hi i have trying making a plugin (im new its my first one)
I making a "Ghostmod" so when you say Ghostme it will set you alpha and you can only get knife and more hp and ap
But!
Then script so the ghost can't pick up weapon works, but non-ghosts can't either pick up weapons :S
It's something with some If (Ghost(id) == 1/ture) { code }
Can you help me?
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <fakemeta>
#define PLUGIN "Ghost Mod"
#define VERSION "1.0"
#define AUTHOR "Gudik"
public plugin_init()
{
register_plugin("Ghost Mod", "1.0", "Gudik");
register_clcmd("Ghostme", "Ghost");
register_event("WeapPickup", "event_weap_pickup", "be", "1!29");
}
public Ghost(id)
{
set_user_health(id, 200);
set_user_rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderTransAlpha, 60);
set_user_armor(id, 200);
set_user_gravity(id, 0.5);
strip_user_weapons(id);
client_print(id, print_chat, "[GhostMod] You are now a Ghost Go kill!!");
client_print(id, print_chat, "[GhostMod] You Have now 200 health and 200 armor!");
client_print(id, print_chat, "[GhostMod] You can only have Knife!");
give_item(id, "weapon_knife");
}
public event_weap_pickup(id) {
set_task(0.1, "RemovePickedWeapon", id);
}
public RemovePickedWeapon(id) {
engclient_cmd(id, "drop", "weapon_c4")
strip_user_weapons(id)
give_item(id,"weapon_knife")
}
Here is the code without variables and this :S
I hope you can help me