1. sayfa (Toplam 1 sayfa)

Soccerjam Gol Olma Mesafesi

Gönderilme zamanı: Pzt Haz 03, 2019 2:46 pm
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

Soccerjam Gol Olma Mesafesi

Gönderilme zamanı: Pzt Haz 03, 2019 4:38 pm
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

Soccerjam Gol Olma Mesafesi

Gönderilme zamanı: Pzt Haz 03, 2019 4:56 pm
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.

Soccerjam Gol Olma Mesafesi

Gönderilme zamanı: Pzt Haz 03, 2019 5:49 pm
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

Soccerjam Gol Olma Mesafesi

Gönderilme zamanı: Sal Haz 04, 2019 2:28 am
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.