|
New Member
|
04-12-2024
, 20:44
Re: warning 218 and error 35
|
#5
|
maybe the whole plugin i change before i made the plugin in my own without add include <hl_wpnmod>
so i check some other weapons that made by community like ethereal and my plugin was missing many things
you can say i try to copy some lines and edit it and when the weapon wont shot i add this
//********************************************* *
//* The main attack of a weapon is triggered. *
//********************************************* *
public Thunderbolt_PrimaryAttack(const iItem, const iPlayer, const iClip)
{
// Print a debug message to the server console
server_print("Thunderbolt_PrimaryAttack called");
// Check if the player is out of ammo
if (iClip <= 0)
{
// Print a debug message to the server console
server_print("Out of ammo");
// Play empty sound if out of ammo
wpnmod_play_empty_sound(iItem);
// Set delay before next shot
wpnmod_set_offset_float(iItem, Offset_flNextPrimaryAttack, 0.15);
return; // Exit the function
}
// Print a debug message to the server console
server_print("Firing Thunderbolt");
// Play firing sound at the player's position
engfunc(EngFunc_EmitSound, iPlayer, CHAN_AUTO, SOUND_FIRE, 0.9, ATTN_NORM, 0, PITCH_NORM);
// Set delay before next shot
wpnmod_set_offset_float(iItem, Offset_flNextPrimaryAttack, 0.1);
// Set player animation
wpnmod_set_player_anim(iPlayer, PLAYER_ATTACK1);
}
im already upload the sma if that needed in main message
and just note when i fix first plugin that doesnt have hl_wpnmod include the weapon wasnt show in items list when i type wpnmod items
this why i rebuild the plugin based on ethereal weapon plugin
Last edited by Aear; 04-12-2024 at 20:48.
|
|
|
|