public CmdStart(id, uc_handle)
{
if(!is_user_alive(id))
{
new Float: velocity[3];
entity_get_vector(id, EV_VEC_velocity, velocity);
new Float: speed = floatsqroot(velocity[0]*velocity[0]+velocity[1]*velocity[1]+velocity[2]*velocity[2]);
if(szybkosc_gracza[id] > speed*1.8)
entity_set_int(id, EV_INT_flTimeStepSound, 300);
}
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = get_user_oldbutton(id);
new flags = get_entity_flags(id);
new clip, ammo, weapon = get_user_weapon(id, clip, ammo);
if(informacje_przedmiotu_gracza[id][0] == 11 || klasa_gracza[id] == Rambo)
{
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && ilosc_skokow_gracza[id] > 0)
{
ilosc_skokow_gracza[id]--;
new Float:velocity[3];
entity_get_vector(id,EV_VEC_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
entity_set_vector(id,EV_VEC_velocity,velocity);
}
else if(flags & FL_ONGROUND)
{
ilosc_skokow_gracza[id] = 0;
if(informacje_przedmiotu_gracza[id][0] == 11)
ilosc_skokow_gracza[id]++;
if(klasa_gracza[id] == Rambo)
ilosc_skokow_gracza[id]++;
}
}
if(button & IN_ATTACK)
{
new Float:punchangle[3];
if(informacje_przedmiotu_gracza[id][0] == 20)
entity_set_vector(id, EV_VEC_punchangle, punchangle);
if(informacje_przedmiotu_gracza[id][0] == 23)
{
entity_get_vector(id, EV_VEC_punchangle, punchangle);
for(new i=0; i<3;i++)
punchangle[i]*=0.9;
entity_set_vector(id, EV_VEC_punchangle, punchangle);
}
}
if(informacje_przedmiotu_gracza[id][0] == 28 && button & IN_JUMP && button & IN_DUCK && flags & FL_ONGROUND && get_gametime() > informacje_przedmiotu_gracza[id][1]+4.0)
{
informacje_przedmiotu_gracza[id][1] = floatround(get_gametime());
new Float:velocity[3];
VelocityByAim(id, 700, velocity);
velocity[2] = random_float(265.0,285.0);
entity_set_vector(id, EV_VEC_velocity, velocity);
}
if(informacje_przedmiotu_gracza[id][0] == 29)
{
if(maxClip[weapon] == -1 || !ammo)
return FMRES_IGNORED;
if((button & IN_RELOAD && !(oldbutton & IN_RELOAD) && !(button & IN_ATTACK)) || !clip)
{
cs_set_user_bpammo(id, weapon, ammo-(maxClip[weapon]-clip));
new new_ammo = (maxClip[weapon] > ammo)? clip+ammo: maxClip[weapon]
set_user_clip(id, new_ammo);
}
}
return FMRES_IGNORED;
}
Macie całą funkcje. Dacie rade pomoc ? :F