im having a little problem. Im new to the coding, and have been trying it out for myself. In this plugin that I mostly tooks from the credit mod plugin, just changes the model of the knife to the crobar. here is the code:
Quote:
#include <amxmodx>
public check_knife(id) {
if (get_cvar_num("sv_crowbar")!=1)
return PLUGIN_CONTINUE
new llama = read_data(0)
client_print(llama,print_center,"Crowbar Active")
client_cmd(llama,"wait;wait;wait;")
if(llama == CSW_KNIFE)
{
entity_set_string(id, EV_SZ_viewmodel, "models/v_crowbar.mdl")
entity_set_string(id, EV_SZ_weaponmodel, "models/p_crowbar.mdl")
}
public plugin_precache()
{
precache_model("models/v_crowbar.mdl")
precache_model("models/p_crowbar.mdl")
}
|
the errors are:
Quote:
/home/users/amxmodx/tmp3/phpcuu41Y.sma(12) : error 017: undefined symbol "entity_set_string"
/home/users/amxmodx/tmp3/phpcuu41Y.sma(12) : warning 215: expression has no effect
/home/users/amxmodx/tmp3/phpcuu41Y.sma(12) : error 001: expected token: ";", but found ")"
/home/users/amxmodx/tmp3/phpcuu41Y.sma(12) : error 029: invalid expression, assumed zero
/home/users/amxmodx/tmp3/phpcuu41Y.sma(12) : fatal error 107: too many error messages on one line
|
Based upon the errors, I assume that I had trouble defining the string.
Please note that i have next to no expierience with plugins.
Any help would be greatly appreciated.