Quote:
Originally Posted by Napoleon_be
Updated my code again, removed is_user_connected() checks in the reset functions since i already remove tasks in client_disconnect(). Also if u modify the plugin, please leave the "if(is_user_alive(id))" check in the shophandler since the player needs to be alive to receive an item. If u don't do this, items will be given to a dead player which is not possible, and money will get decreased of the player buying from the shop.
|
i can't leave only to Alive player because of the Respawn! when someone dies he isn't able to buy respawn, thats why i used is user alive only where it had to be, like here
PHP Code:
case 7:
{
if(!is_user_alive(id))
{
ExecuteHamB(Ham_CS_RoundRespawn, id);
CromChat(id, "!g[hS Shop] !nYou have purchased Respawn")
}
else
{
CromChat(id, "!g[hS Shop] !nYou are not dead, you can't buy Respawn if you're alive")
}
}
__________________