A tworzysz je tylko raz?
A usuwasz je przy zmianie zwierzaka?
Z tego co widzę to się respią ciągle:
public Odrodzenie(id){
if(!is_user_alive(id)) return;
if(pettype[id] == -1) return;
CreatePet(id, pettype[id]);
}
Jak to zrobić, żeby właśnie respiło tylko raz i tak raczej usuwam je przy zmianie:
public knifemenu_premium(id, menu, item)
{
if(!is_user_connected(id))
return PLUGIN_HANDLED;
if(item == MENU_EXIT)
{
menu_destroy(id);
return PLUGIN_HANDLED;
}
switch(item)
{
case 0:
{
if(pet[id]) client_print(id,print_chat,"[AMXX] %L",id,"MSG_REMOVEPET")
else client_print(id,print_chat,"[AMXX] %L",id,"MSG_NOREMOVEPET")
handle_DeathMsg(id)
}
case 1:{
handle_DeathMsg(id)
pet_cmd_handle(id,0)
}
case 2:{
handle_DeathMsg(id)
pet_cmd_handle(id,1)
}
case 3:{
handle_DeathMsg(id)
pet_cmd_handle(id,2)
}
case 4:{
handle_DeathMsg(id)
pet_cmd_handle(id,3)
}
case 5:{
handle_DeathMsg(id)
pet_cmd_handle(id,4)
}
case 6:{
handle_DeathMsg(id)
pet_cmd_handle(id,9)
}
case 7:{
handle_DeathMsg(id)
pet_cmd_handle(id,8)
}
}
pet_zapisz(id)
menu_destroy(menu);
return PLUGIN_HANDLED
}


Dodatki SourceMod












