Problem z dodaniem itemu do sklepu
xKubaPL
08.02.2015
Witam, mam problem aby dodać itemu autobh do sklepu cs.
Chodzi mi oto żeby nie każdy miał autobh tylko jak ktoś sobie kupi za np 5000$.
Jeżeli będzie trzeba podam sklep na gg. albo tutaj.
Dziobak?
08.02.2015
pod bibliotekę
new bool: AutoBH[33];
do sklepu dodajesz tylko AutoBH[id] = true;
przykład:
new kasa = cs_get_user_money(id);
case 0: { if(kasa >= 5000) { cs_set_user_money(id, kasa-5000); AutoBH[id] = true; // info kupiles autobh } else // info o niewystarczajacej ilosci kasy }
do plugin_init()
register_forward(FM_PlayerPreThink, "PreThinkBHop")
na koniec kodu
public PreThinkBHop(id) { if(!is_user_alive(id) || !AutoBH[id]) return 0 if(entity_get_int(id, EV_INT_button) & 2) { new flagi = entity_get_int(id, EV_INT_flags) if(flagi & (1 << 11)) return 0 if(entity_get_int(id, EV_INT_waterlevel) >= 2) return 0 if(!(flagi & (1<<9))) return 0 new Float:velocity[3] entity_get_vector(id, EV_VEC_velocity, velocity) velocity[2] += 250.0 entity_set_vector(id, EV_VEC_velocity, velocity) entity_set_int(id, EV_INT_gaitsequence, 6) } return 0 }
xKubaPL
08.02.2015
public PreThinkBHop(id)
{
if(!is_user_alive(id) || !AutoBH[id]) return 0
if(entity_get_int(id, EV_INT_button) & 2) {
new flagi = entity_get_int(id, EV_INT_flags)
if(flagi & (1 << 11)) return 0
if(entity_get_int(id, EV_INT_waterlevel) >= 2) return 0
if(!(flagi & (1<<9))) return 0
new Float:velocity[3]
entity_get_vector(id, EV_VEC_velocity, velocity)
velocity[2] += 250.0
entity_set_vector(id, EV_VEC_velocity, velocity)
entity_set_int(id, EV_INT_gaitsequence, 6)
}
return 0
}
jakiś błąd bo wyskakuje
to:
shop.sma(224) : error 017: undefined symbol "entity_get_int"
shop.sma(225) : error 017: undefined symbol "entity_get_int"
shop.sma(228) : error 017: undefined symbol "entity_get_int"
shop.sma(232) : error 017: undefined symbol "entity_get_vector"
Użytkownik xKubaPL edytował ten post 08.02.2015 19:24
xKubaPL
08.02.2015
Link do pobrania: sma sklepu. zobacz co i jak bo sklep się nie włącza nawet. http://www74.zippysh...9Vdc1/file.html