hi guys, lets say i would like to change a view model while buying smth from a shop menu, ex.
PHP Code:
case 4 :
{
if (!is_user_alive(id)) {
CromChat(id, "!g[%s]!n You can't buy that item because you are dead.", PREFIX);
client_cmd(id, "spk ^"%s^"", SoundMenu );
}
else
{
if ( points < 10 ) {
client_cmd ( id, "spk ^"%s^"", SoundMenu );
CromChat (id, "!g[%s]!n You dont have enough to buy !g100HP+100AP!n, you need !g10 points", PREFIX);
return PLUGIN_HANDLED;
}
new health = get_user_health(id);
if( health < 300 ) {
set_user_health (id, get_user_health (id) + 100);
set_user_armor(id, get_user_armor(id) + 100);
gKillerPoints[ id ] -= 10;
client_cmd ( id, "spk ^"%s^"", MenuSound );
set_hudmessage(255, 255, 255, -1.0, 0.45, 0, 1.0, 5.0, 0.1, 0.2, 1)
show_hudmessage(id, "You have purchased 100HP+100AP.");
CromChat (0, "!g[%s]!n Player!t %s !nhas purchased !g100HP+100AP !n[!g 10 points!n ]", PREFIX, name);
}
else {
client_cmd ( id, "spk ^"%s^"", SoundMenu );
CromChat(id, "!g[%s]!n You are not allowed to buy health over !g300.", PREFIX);
}
}
}
and while buying the health i would like to add a specific animation v_.mdl and then to be back to normal, to the weapon or the pistol or the knife that the player had in head, is that possible?
__________________