| olafur164 |
01-25-2010 04:31 |
my hns shop
i need a little bit help.
anyone here know how to add timeleft on like invis in hudmsg in the center of the screen?
Here's the code
Code:
case 2:
{
if(!is_user_alive(id)) {
ColorChat(0, GREEN, "^x04[HnS Shop]^x01 You need to be alive!");
return PLUGIN_HANDLED;
}
if(userinvis[id] > 0) {
ColorChat(0, GREEN, "^x04[HnS Shop]^x01 You already own this item!");
return PLUGIN_HANDLED;
}
if(get_pcvar_num(allowinvis) == 0) {
ColorChat(0, GREEN, "^x04[HnS Shop]^x01 This item is disabled.");
return PLUGIN_HANDLED;
}
{
new iMoney = cs_get_user_money( id )
new iPrice = get_pcvar_num( iInvis )
new Float:flDelay = get_pcvar_float( iGodmode_time );
if( iMoney < iPrice )
{
ColorChat(0, GREEN, "^x04[HnS Shop]^x01 You need more^x04 money^x01 to buy this!" );
return PLUGIN_HANDLED;
}
if( iMoney >= iPrice )
{
cs_set_user_money( id, iMoney - iPrice );
set_user_godmode(id, 1);
set_task( flDelay, "remove_godmode", id );
ColorChat(0, GREEN, "x04[HnS Shop]^x01 you purchased^x03 invis^x04, for %s seconds!",get_pcvar_num(iGodmode_time));
}
}
}
|