Discord sunucumuz açılmıştır, hepinizi bekleriz

https://discord.gg/43gGDQe6tS

Soccerjam Gol Olma Mesafesi

Eklenti sorunlarınız ve özel eklenti istekleriniz

Moderatör: Moderatörler


Konu Sahibi
tepegoz
Mesajlar: 266
Kayıt: Pzr Kas 19, 2017 2:06 am
Clan İsmi: -

Soccerjam Gol Olma Mesafesi

Mesaj gönderen tepegoz »

soccerjam.sma
Soccerjam de uzaktan gol atmayı engellemek istiyorum. 150 ft den ve uzağından gol atıldığında gol geçersiz olacak.
Şu kodlar yardımcı olabilir

Kod: Tümünü seç

new CVAR_MAXDISTGOAL 

CVAR_MAXDISTGOAL = register_cvar("sj_max_dist_goal", "100") 


public touchNet(ball, goalpost) 
{ 
    remove_task(55555) 

    new team = get_user_team(ballowner) 
    new goalent = GoalEnt[team] 
    new maxdistshot = (get_pcvar_num(CVAR_MAXDISTGOAL)) 
    new distshot = (get_distance(distorig[0],distorig[1])/12) 
     
    if (goalpost != goalent && ballowner > 0) { 
        if(distshot <= maxdistshot) { 
        new aname[64] 
        new Float:netOrig[3] 
        new netOrig2[3] 

//bla-bla vs......................... 
        } 
    else { 
    moveBall(1) 
    client_print(ballowner,print_chat,"%L",ballowner,"CANNOT_SCORE_DIST",distshot,maxdistshot) 
    } 
    } 
    else if(goalpost == goalent) { 
        moveBall(0, team) 
        client_print(ballowner,print_chat,"%L",ballowner,"CANNOT_KICK_GOAL") 
    } 
    return PLUGIN_HANDLED 
}  
Txt= CANNOT_SCORE_DIST = You cannot score from %i ft distance (%i ft is max distance)!!
DOSYA EKL
Veya bu smadaki sj_lamedist cvarı işe yarayabilir.
https://github.com/davidkohout/Soccerja ... jam%2B.sma

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

seypa
Mesajlar: 1390
Kayıt: Cmt Ağu 13, 2016 12:49 pm
Konum: Pendik/İstanbul
İletişim:

Soccerjam Gol Olma Mesafesi

Mesaj gönderen seypa »

tepegoz yazdı: Pzt Haz 03, 2019 2:46 pm soccerjam.sma
Soccerjam de uzaktan gol atmayı engellemek istiyorum. 150 ft den ve uzağından gol atıldığında gol geçersiz olacak.
Şu kodlar yardımcı olabilir

Kod: Tümünü seç

new CVAR_MAXDISTGOAL 

CVAR_MAXDISTGOAL = register_cvar("sj_max_dist_goal", "100") 


public touchNet(ball, goalpost) 
{ 
    remove_task(55555) 

    new team = get_user_team(ballowner) 
    new goalent = GoalEnt[team] 
    new maxdistshot = (get_pcvar_num(CVAR_MAXDISTGOAL)) 
    new distshot = (get_distance(distorig[0],distorig[1])/12) 
     
    if (goalpost != goalent && ballowner > 0) { 
        if(distshot <= maxdistshot) { 
        new aname[64] 
        new Float:netOrig[3] 
        new netOrig2[3] 

//bla-bla vs......................... 
        } 
    else { 
    moveBall(1) 
    client_print(ballowner,print_chat,"%L",ballowner,"CANNOT_SCORE_DIST",distshot,maxdistshot) 
    } 
    } 
    else if(goalpost == goalent) { 
        moveBall(0, team) 
        client_print(ballowner,print_chat,"%L",ballowner,"CANNOT_KICK_GOAL") 
    } 
    return PLUGIN_HANDLED 
}  
Txt= CANNOT_SCORE_DIST = You cannot score from %i ft distance (%i ft is max distance)!!
DOSYA EKL
Veya bu smadaki sj_lamedist cvarı işe yarayabilir.
https://github.com/davidkohout/Soccerja ... jam%2B.sma
.inc dosyasini buraya yollasan daha iyi olur

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
tepegoz
Mesajlar: 266
Kayıt: Pzr Kas 19, 2017 2:06 am
Clan İsmi: -

Soccerjam Gol Olma Mesafesi

Mesaj gönderen tepegoz »

seypa yazdı: Pzt Haz 03, 2019 4:38 pm
tepegoz yazdı: Pzt Haz 03, 2019 2:46 pm soccerjam.sma
Soccerjam de uzaktan gol atmayı engellemek istiyorum. 150 ft den ve uzağından gol atıldığında gol geçersiz olacak.
Şu kodlar yardımcı olabilir

Kod: Tümünü seç

new CVAR_MAXDISTGOAL 

CVAR_MAXDISTGOAL = register_cvar("sj_max_dist_goal", "100") 


public touchNet(ball, goalpost) 
{ 
    remove_task(55555) 

    new team = get_user_team(ballowner) 
    new goalent = GoalEnt[team] 
    new maxdistshot = (get_pcvar_num(CVAR_MAXDISTGOAL)) 
    new distshot = (get_distance(distorig[0],distorig[1])/12) 
     
    if (goalpost != goalent && ballowner > 0) { 
        if(distshot <= maxdistshot) { 
        new aname[64] 
        new Float:netOrig[3] 
        new netOrig2[3] 

//bla-bla vs......................... 
        } 
    else { 
    moveBall(1) 
    client_print(ballowner,print_chat,"%L",ballowner,"CANNOT_SCORE_DIST",distshot,maxdistshot) 
    } 
    } 
    else if(goalpost == goalent) { 
        moveBall(0, team) 
        client_print(ballowner,print_chat,"%L",ballowner,"CANNOT_KICK_GOAL") 
    } 
    return PLUGIN_HANDLED 
}  
Txt= CANNOT_SCORE_DIST = You cannot score from %i ft distance (%i ft is max distance)!!
DOSYA EKL
Veya bu smadaki sj_lamedist cvarı işe yarayabilir.
https://github.com/davidkohout/Soccerja ... jam%2B.sma
.inc dosyasini buraya yollasan daha iyi olur
Ne inc si anlamadım herhangi bir özel inc yok. Diğer soccerjam zaten github linki verdim.

Link:
Linklerini gizle
Linki Kopyala

F.T.H
Mesajlar: 546
Kayıt: Pzr Mar 19, 2017 12:55 pm
Konum: Ϲ★
İletişim:

Soccerjam Gol Olma Mesafesi

Mesaj gönderen F.T.H »

tepegoz yazdı: Pzt Haz 03, 2019 2:46 pm Soccerjam de uzaktan gol atmayı engellemek istiyorum. 150 ft den ve uzağından gol atıldığında gol geçersiz olacak.
Attığın sma içerisine ayarladım fakat Soccerjam+ içerisinde zaten dahil olan bir komut neden onu kullanmıyorsunuz
amx_cvar sj_lamedist üzerinden ayarlayabilirsin mesafeyi
Bu mesaja eklenen dosyaları görüntülemek için gerekli izinlere sahip değilsiniz.

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
tepegoz
Mesajlar: 266
Kayıt: Pzr Kas 19, 2017 2:06 am
Clan İsmi: -

Soccerjam Gol Olma Mesafesi

Mesaj gönderen tepegoz »

F.T.H yazdı: Pzt Haz 03, 2019 5:49 pm
tepegoz yazdı: Pzt Haz 03, 2019 2:46 pm Soccerjam de uzaktan gol atmayı engellemek istiyorum. 150 ft den ve uzağından gol atıldığında gol geçersiz olacak.
Attığın sma içerisine ayarladım fakat Soccerjam+ içerisinde zaten dahil olan bir komut neden onu kullanmıyorsunuz
amx_cvar sj_lamedist üzerinden ayarlayabilirsin mesafeyi
teşekkürler çalışıyor bayağı uğraşmıştım yapmak için :) O eklentiyi kullanmıyorum çünkü sj_pro da olan özellikler onda yok.

Link:
Linklerini gizle
Linki Kopyala
Cevapla