Kaç saatir paintball modundan şu kodları bulup ayarlamaya çalışıyorum ama sonuç nafile 30 dan fazla hata verdi yaptım düzelttim ama hala boyaa atmıyor arkadaşlar
birde siz deneseniz ya
Konu
(07-08-2020, 17:42)Muhammet Bulut Adlı Kullanıcıdan Alıntı: Kaç saatir paintball modundan şu kodları bulup ayarlamaya çalışıyorum ama sonuç nafile 30 dan fazla hata verdi yaptım düzelttim ama hala boyaa atmıyor arkadaşlarServerin hlds ise boya atmayabilir. Verimli sonuç alabilmen için sunucularda denemlisin.
birde siz deneseniz ya
Son Düzenleme: 07-08-2020, 17:46, Düzenleyen: scuro.
(07-08-2020, 17:45)suriyelikene Adlı Kullanıcıdan Alıntı:paintball modda atıyor knk sorun yok hldsden hatta botlar bile boya atıyor eğlenceli oluyor arada sırada oynuyorum(07-08-2020, 17:42)Muhammet Bulut Adlı Kullanıcıdan Alıntı: Kaç saatir paintball modundan şu kodları bulup ayarlamaya çalışıyorum ama sonuç nafile 30 dan fazla hata verdi yaptım düzelttim ama hala boyaa atmıyor arkadaşlarServerin hlds ise boya atmayabilir. Verimli sonuç alabilmen için sunucularda denemlisin.
birde siz deneseniz ya
(07-08-2020, 17:53)Muhammet Bulut Adlı Kullanıcıdan Alıntı:"Şu kodları bulup ayarlamaya çalışıyorum."(07-08-2020, 17:45)suriyelikene Adlı Kullanıcıdan Alıntı:paintball modda atıyor knk sorun yok hldsden hatta botlar bile boya atıyor eğlenceli oluyor arada sırada oynuyorum(07-08-2020, 17:42)Muhammet Bulut Adlı Kullanıcıdan Alıntı: Kaç saatir paintball modundan şu kodları bulup ayarlamaya çalışıyorum ama sonuç nafile 30 dan fazla hata verdi yaptım düzelttim ama hala boyaa atmıyor arkadaşlarServerin hlds ise boya atmayabilir. Verimli sonuç alabilmen için sunucularda denemlisin.
birde siz deneseniz ya
Ne demek istediğini anlamadım.
(07-08-2020, 17:54)suriyelikene Adlı Kullanıcıdan Alıntı:(07-08-2020, 17:53)Muhammet Bulut Adlı Kullanıcıdan Alıntı:"Şu kodları bulup ayarlamaya çalışıyorum."(07-08-2020, 17:45)suriyelikene Adlı Kullanıcıdan Alıntı:paintball modda atıyor knk sorun yok hldsden hatta botlar bile boya atıyor eğlenceli oluyor arada sırada oynuyorum(07-08-2020, 17:42)Muhammet Bulut Adlı Kullanıcıdan Alıntı: Kaç saatir paintball modundan şu kodları bulup ayarlamaya çalışıyorum ama sonuç nafile 30 dan fazla hata verdi yaptım düzelttim ama hala boyaa atmıyor arkadaşlarServerin hlds ise boya atmayabilir. Verimli sonuç alabilmen için sunucularda denemlisin.
birde siz deneseniz ya
Ne demek istediğini anlamadım.
Galiba şey demek istemiş. mermi yerine boya topu atan kodları bulup ayarlamaya çalısıyorum. demek istemiş konu onun uzerıne saten

(07-08-2020, 17:56)Possidentis Adlı Kullanıcıdan Alıntı:evet(07-08-2020, 17:54)suriyelikene Adlı Kullanıcıdan Alıntı:(07-08-2020, 17:53)Muhammet Bulut Adlı Kullanıcıdan Alıntı:"Şu kodları bulup ayarlamaya çalışıyorum."(07-08-2020, 17:45)suriyelikene Adlı Kullanıcıdan Alıntı:paintball modda atıyor knk sorun yok hldsden hatta botlar bile boya atıyor eğlenceli oluyor arada sırada oynuyorum(07-08-2020, 17:42)Muhammet Bulut Adlı Kullanıcıdan Alıntı: Kaç saatir paintball modundan şu kodları bulup ayarlamaya çalışıyorum ama sonuç nafile 30 dan fazla hata verdi yaptım düzelttim ama hala boyaa atmıyor arkadaşlarServerin hlds ise boya atmayabilir. Verimli sonuç alabilmen için sunucularda denemlisin.
birde siz deneseniz ya
Ne demek istediğini anlamadım.
Galiba şey demek istemiş. mermi yerine boya topu atan kodları bulup ayarlamaya çalısıyorum. demek istemiş konu onun uzerıne saten
PHP Kod:
public paint_fire(id, num)
{
new a, ent;
while (a++ < g_pbcount - 1 && !ent)
if (g_pbstatus[a] == 0)
ent = g_pbstatus[a] = g_paintballs[a];
if (!ent)
while (a-- > 1 && !ent)
if (g_pbstatus[a] == 2)
ent = g_pbstatus[a] = g_paintballs[a];
if (pev_valid(ent) && is_user_alive(id))
{
new Float:vangles[3], Float:nvelocity[3], Float:voriginf[3], vorigin[3], clr;
set_pev(ent, pev_owner, id);
new my_pbgun = user_has_pbgun(id);
if (my_pbgun != PB_LAUNCHER) { //create a pellet
set_pev(ent, pev_classname, "pbBullet");
engfunc(EngFunc_SetModel, ent, "models/w_paintball.mdl");
if (my_pbgun == PB_SHOTGUN) //make them smaller to avoid creation collisions
engfunc(EngFunc_SetSize, ent, Float:{0.0, 0.0, 0.0}, Float:{1.0, 1.0, 1.0});
else
engfunc(EngFunc_SetSize, ent, Float:{-1.0, -1.0, -1.0}, Float:{1.0, 1.0, 1.0});
switch (get_pcvar_num(color))
{
case 2: clr = (get_user_team(id) == 1) ? 0 : 1;
case 3: clr = (get_user_team(id) == 1) ? 4 : 3;
case 4: clr = (get_user_team(id) == 1) ? 2 : 5;
default: clr = random_num(0, 6);
}
set_pev(ent, pev_skin, clr);
set_pev(ent, pev_gravity, 0.5);
}else
{ //create a nade
set_pev(ent, pev_classname, "pbExplosive");
engfunc(EngFunc_SetModel, ent, "models/w_pb_launch_he.mdl");
engfunc(EngFunc_SetSize, ent, Float:{-3.0, -3.0, -3.0}, Float:{3.0, 3.0, 3.0});
set_pev(ent, pev_gravity, 1.0);
}
get_user_origin(id, vorigin, 1);
if (my_pbgun == PB_SHOTGUN)
{ //avoid creation collisions
vorigin[0] += random(5)-2;
vorigin[1] += random(5)-2;
vorigin[2] += num*5
}
IVecFVec(vorigin, voriginf);
engfunc(EngFunc_SetOrigin, ent, voriginf);
vangles[0] = random_float(-180.0, 180.0);
vangles[1] = random_float(-180.0, 180.0);
set_pev(ent, pev_angles, vangles);
pev(id, pev_v_angle, vangles);
set_pev(ent, pev_v_angle, vangles);
pev(id, pev_view_ofs, vangles);
set_pev(ent, pev_view_ofs, vangles);
new veloc;
if (get_pcvar_num(gravity))
set_pev(ent, pev_movetype, MOVETYPE_BOUNCE);
else
set_pev(ent, pev_movetype, MOVETYPE_FLY);
set_pev(ent, pev_solid, 2);
//Different guns shoot at different speeds
switch (my_pbgun)
{
case PB_MARKER: veloc = get_pcvar_num(speed_marker);
case PB_GLOCK: veloc = get_pcvar_num(speed_pistol);
case PB_USP: veloc = get_pcvar_num(speed_pistol);
case PB_SNIPER: veloc = get_pcvar_num(speed_sniper);
case PB_LAUNCHER: veloc = get_pcvar_num(speed_launcher);
case PB_SHOTGUN: veloc = get_pcvar_num(speed_shotgun);
case PB_SUPERMARKER: veloc = get_pcvar_num(speed_smarker);
default: veloc = get_pcvar_num(speed_pistol);
}
velocity_by_aim(id, veloc, nvelocity);
//Fix aim for bots
if (is_user_bot(id))
switch (my_pbgun)
{
case PB_MARKER: nvelocity[2] += (get_pcvar_num(gravity))? 150 : 0;
case PB_GLOCK: nvelocity[2] += (get_pcvar_num(gravity))? 200 : 0;
case PB_USP: nvelocity[2] += (get_pcvar_num(gravity))? 200 : 0;
case PB_SNIPER: nvelocity[2] += (get_pcvar_num(gravity))? 35 : 0;
case PB_LAUNCHER: nvelocity[2] += 250;
case PB_SHOTGUN: nvelocity[2] += (get_pcvar_num(gravity))? 50 : 0;
case PB_SUPERMARKER: nvelocity[2] += (get_pcvar_num(gravity))? 100 : 0;
default: nvelocity[2] += (get_pcvar_num(gravity))? 150 : 0;
}
//Recoil!!!
if (cs_get_user_zoom(id)== CS_SET_NO_ZOOM){
//the sniper will shoot terribly bad without a scope
new modifier = (my_pbgun != PB_SNIPER)? 1 : 5;
new buttons = pev(id, pev_button);
if (my_pbgun == PB_SHOTGUN)
modifier = 2;
else //shoot worse while moving
if (buttons & IN_JUMP || buttons & IN_FORWARD || buttons & IN_BACK || buttons & IN_MOVELEFT || buttons & IN_MOVERIGHT)
modifier *= 2;
new disp = get_pcvar_num(dispersion);
nvelocity[0] += (random(disp)-disp/2) * modifier;
nvelocity[1] += (random(disp)-disp/2) * modifier;
nvelocity[2] += (random(disp)-disp/2) * modifier;
}
set_pev(ent, pev_velocity, nvelocity);
set_pev(ent, pev_effects, pev(ent, pev_effects) & ~EF_NODRAW);
//glow
set_task(0.1, "paint_glow", ent);
if (my_pbgun != PB_LAUNCHER) //make it dissapear after a while
set_task(15.0 , "paint_reset", ent+TASK_PB_RESET);
else //make it explode if there is no impact
set_task(2.0, "time_explode", ent+TASK_PB_RESET);
}
return ent;
}
(07-08-2020, 18:37)XaRex Adlı Kullanıcıdan Alıntı:evet knk bende onu zaten buldumda yapamadımPaintball modunda ki boya atma public'i. Mantığı Ateş edince entity oluşturup bomba modeli vermesi vs. vs.PHP Kod:public paint_fire(id, num)
{
new a, ent;
while (a++ < g_pbcount - 1 && !ent)
if (g_pbstatus[a] == 0)
ent = g_pbstatus[a] = g_paintballs[a];
if (!ent)
while (a-- > 1 && !ent)
if (g_pbstatus[a] == 2)
ent = g_pbstatus[a] = g_paintballs[a];
if (pev_valid(ent) && is_user_alive(id))
{
new Float:vangles[3], Float:nvelocity[3], Float:voriginf[3], vorigin[3], clr;
set_pev(ent, pev_owner, id);
new my_pbgun = user_has_pbgun(id);
if (my_pbgun != PB_LAUNCHER) { //create a pellet
set_pev(ent, pev_classname, "pbBullet");
engfunc(EngFunc_SetModel, ent, "models/w_paintball.mdl");
if (my_pbgun == PB_SHOTGUN) //make them smaller to avoid creation collisions
engfunc(EngFunc_SetSize, ent, Float:{0.0, 0.0, 0.0}, Float:{1.0, 1.0, 1.0});
else
engfunc(EngFunc_SetSize, ent, Float:{-1.0, -1.0, -1.0}, Float:{1.0, 1.0, 1.0});
switch (get_pcvar_num(color))
{
case 2: clr = (get_user_team(id) == 1) ? 0 : 1;
case 3: clr = (get_user_team(id) == 1) ? 4 : 3;
case 4: clr = (get_user_team(id) == 1) ? 2 : 5;
default: clr = random_num(0, 6);
}
set_pev(ent, pev_skin, clr);
set_pev(ent, pev_gravity, 0.5);
}else
{ //create a nade
set_pev(ent, pev_classname, "pbExplosive");
engfunc(EngFunc_SetModel, ent, "models/w_pb_launch_he.mdl");
engfunc(EngFunc_SetSize, ent, Float:{-3.0, -3.0, -3.0}, Float:{3.0, 3.0, 3.0});
set_pev(ent, pev_gravity, 1.0);
}
get_user_origin(id, vorigin, 1);
if (my_pbgun == PB_SHOTGUN)
{ //avoid creation collisions
vorigin[0] += random(5)-2;
vorigin[1] += random(5)-2;
vorigin[2] += num*5
}
IVecFVec(vorigin, voriginf);
engfunc(EngFunc_SetOrigin, ent, voriginf);
vangles[0] = random_float(-180.0, 180.0);
vangles[1] = random_float(-180.0, 180.0);
set_pev(ent, pev_angles, vangles);
pev(id, pev_v_angle, vangles);
set_pev(ent, pev_v_angle, vangles);
pev(id, pev_view_ofs, vangles);
set_pev(ent, pev_view_ofs, vangles);
new veloc;
if (get_pcvar_num(gravity))
set_pev(ent, pev_movetype, MOVETYPE_BOUNCE);
else
set_pev(ent, pev_movetype, MOVETYPE_FLY);
set_pev(ent, pev_solid, 2);
//Different guns shoot at different speeds
switch (my_pbgun)
{
case PB_MARKER: veloc = get_pcvar_num(speed_marker);
case PB_GLOCK: veloc = get_pcvar_num(speed_pistol);
case PB_USP: veloc = get_pcvar_num(speed_pistol);
case PB_SNIPER: veloc = get_pcvar_num(speed_sniper);
case PB_LAUNCHER: veloc = get_pcvar_num(speed_launcher);
case PB_SHOTGUN: veloc = get_pcvar_num(speed_shotgun);
case PB_SUPERMARKER: veloc = get_pcvar_num(speed_smarker);
default: veloc = get_pcvar_num(speed_pistol);
}
velocity_by_aim(id, veloc, nvelocity);
//Fix aim for bots
if (is_user_bot(id))
switch (my_pbgun)
{
case PB_MARKER: nvelocity[2] += (get_pcvar_num(gravity))? 150 : 0;
case PB_GLOCK: nvelocity[2] += (get_pcvar_num(gravity))? 200 : 0;
case PB_USP: nvelocity[2] += (get_pcvar_num(gravity))? 200 : 0;
case PB_SNIPER: nvelocity[2] += (get_pcvar_num(gravity))? 35 : 0;
case PB_LAUNCHER: nvelocity[2] += 250;
case PB_SHOTGUN: nvelocity[2] += (get_pcvar_num(gravity))? 50 : 0;
case PB_SUPERMARKER: nvelocity[2] += (get_pcvar_num(gravity))? 100 : 0;
default: nvelocity[2] += (get_pcvar_num(gravity))? 150 : 0;
}
//Recoil!!!
if (cs_get_user_zoom(id)== CS_SET_NO_ZOOM){
//the sniper will shoot terribly bad without a scope
new modifier = (my_pbgun != PB_SNIPER)? 1 : 5;
new buttons = pev(id, pev_button);
if (my_pbgun == PB_SHOTGUN)
modifier = 2;
else //shoot worse while moving
if (buttons & IN_JUMP || buttons & IN_FORWARD || buttons & IN_BACK || buttons & IN_MOVELEFT || buttons & IN_MOVERIGHT)
modifier *= 2;
new disp = get_pcvar_num(dispersion);
nvelocity[0] += (random(disp)-disp/2) * modifier;
nvelocity[1] += (random(disp)-disp/2) * modifier;
nvelocity[2] += (random(disp)-disp/2) * modifier;
}
set_pev(ent, pev_velocity, nvelocity);
set_pev(ent, pev_effects, pev(ent, pev_effects) & ~EF_NODRAW);
//glow
set_task(0.1, "paint_glow", ent);
if (my_pbgun != PB_LAUNCHER) //make it dissapear after a while
set_task(15.0 , "paint_reset", ent+TASK_PB_RESET);
else //make it explode if there is no impact
set_task(2.0, "time_explode", ent+TASK_PB_RESET);
}
return ent;
}
çok denedim ama bunu tek halinde denemedim bunu tek halindemi denemem lazımknk tek denedim şimdi fakat derleyicede new lerin hatası çıkıyor
g_pbcount
gibi
new olarak onları eklemek istemiyorum gerek yok bu g_pbcount bunları nasıl kaldırcam o boya atma kodundan
engfunc(EngFunc_SetModel, ent, "models/w_pb_launch_he.mdl");
bununda kalkması gerekli knk nasıl yaparız
g_pbcount
gibi
new olarak onları eklemek istemiyorum gerek yok bu g_pbcount bunları nasıl kaldırcam o boya atma kodundan
engfunc(EngFunc_SetModel, ent, "models/w_pb_launch_he.mdl");
bununda kalkması gerekli knk nasıl yaparız
Son Düzenleme: 07-08-2020, 18:45, Düzenleyen: Muhammet Bulut.
Benzer Konular
Yorum
1.097
Okunma
08-02-2026, 13:09
)


