AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Knife Bounty + Secure (v1.5) (https://forums.alliedmods.net/showthread.php?t=294896)

OciXCrom 03-11-2017 09:25

Re: Knife Bounty + Secure (v1.1)
 
Code:

[mk]
VICTIM_SECURED = [Knife Bounty] Zhrtvata beshe osigurana !
VICTIM_DIDNT_LOSE = [Knife Bounty] Ne gi zagubi parite zatoa shto beshe osiguran !
VICTIM_MONEY_LOW = [Knife Bounty] Zhrtvata imashe malku pari. Ne dobi nishto od nego !
ATTACKER_BOUNTY = [Knife Bounty] Zema nagradata na %s od $%d !
VICTIM_LOST_MONEY = [Knife Bounty] %s ja zema tvojata nagrada od $%d !
SECURE_AD = [Knife Bounty] Za da gi osigurash tvoite pari, napishi /secure !
CANT_SECURE_DEAD = [Knife Bounty] Ne mozesh da se osigurash dodeka si mrtov !
SECURE_DISABLED = [Knife Bounty] Osiguruvanjeto momentalno e isklucheno !
NOT_ENOUGH_MONEY = [Knife Bounty] Nemash dovolno pari za osiguruvanje !
SECURED_MONEY = [Knife Bounty] Plati $%d za osigiruvanje na parite i istite nema da gi izgubish ako te zakolat !


edon1337 03-11-2017 10:14

Re: Knife Bounty + Secure (v1.1)
 
Quote:

Originally Posted by OciXCrom (Post 2502677)
Code:

[mk]
VICTIM_SECURED = [Knife Bounty] Zhrtvata beshe osigurana !
VICTIM_DIDNT_LOSE = [Knife Bounty] Ne gi zagubi parite zatoa shto beshe osiguran !
VICTIM_MONEY_LOW = [Knife Bounty] Zhrtvata imashe malku pari. Ne dobi nishto od nego !
ATTACKER_BOUNTY = [Knife Bounty] Zema nagradata na %s od $%d !
VICTIM_LOST_MONEY = [Knife Bounty] %s ja zema tvojata nagrada od $%d !
SECURE_AD = [Knife Bounty] Za da gi osigurash tvoite pari, napishi /secure !
CANT_SECURE_DEAD = [Knife Bounty] Ne mozesh da se osigurash dodeka si mrtov !
SECURE_DISABLED = [Knife Bounty] Osiguruvanjeto momentalno e isklucheno !
NOT_ENOUGH_MONEY = [Knife Bounty] Nemash dovolno pari za osiguruvanje !
SECURED_MONEY = [Knife Bounty] Plati $%d za osigiruvanje na parite i istite nema da gi izgubish ako te zakolat !


Thanks, Credits added.

Quote:

Originally Posted by HamletEagle (Post 2502671)
Yes. Because if x has the bool set to true, x disconnects, y connects and y gets the id of x then the bool will be true for him.

Done. Thanks :)

addons_zz 03-11-2017 18:51

Re: Knife Bounty + Secure (v1.2)
 
Brazilian Portuguese
Code:

[bp]
VICTIM_SECURED = [Olha-a-Faca] A Vitima tinha seguro contra facadas!
VICTIM_DIDNT_LOSE = [Olha-a-Faca] Voce nao perdeu o seu dinheiro por que tinha seguro contra facadas!
VICTIM_MONEY_LOW = [Olha-a-Faca] A vitima estava durinha da silva. Voce nao ganhou nenhum dinheiro extra!
ATTACKER_BOUNTY = [Olha-a-Faca] Voce pegou de %s a recompensa de $%d!
VICTIM_LOST_MONEY = [Olha-a-Faca] %s pegou sua recompensa de $%d!
SECURE_AD = [Olha-a-Faca] Para proteger seu dinheiro contra esfaqueadores, digite /secure
CANT_SECURE_DEAD = [Olha-a-Faca] Voce nao pode comprar um seguro quando esta morto!
SECURE_DISABLED = [Olha-a-Faca] A venda de seguros estah desativada!
NOT_ENOUGH_MONEY = [Olha-a-Faca] Voce estah muito duro para comprar um seguro!
SECURED_MONEY = [Olha-a-Faca] Voce pagou $%d para proteger o seu dinheiro. Esfaqueadores nao poderao pegar seu dinheiro!


edon1337 03-12-2017 05:17

Re: Knife Bounty + Secure (v1.2)
 
Quote:

Originally Posted by addons_zz (Post 2502830)
Brazilian Portuguese
Code:

[bp]
VICTIM_SECURED = [Olha-a-Faca] A Vitima tinha seguro contra facadas!
VICTIM_DIDNT_LOSE = [Olha-a-Faca] Voce nao perdeu o seu dinheiro por que tinha seguro contra facadas!
VICTIM_MONEY_LOW = [Olha-a-Faca] A vitima estava durinha da silva. Voce nao ganhou nenhum dinheiro extra!
ATTACKER_BOUNTY = [Olha-a-Faca] Voce pegou de %s a recompensa de $%d!
VICTIM_LOST_MONEY = [Olha-a-Faca] %s pegou sua recompensa de $%d!
SECURE_AD = [Olha-a-Faca] Para proteger seu dinheiro contra esfaqueadores, digite /secure
CANT_SECURE_DEAD = [Olha-a-Faca] Voce nao pode comprar um seguro quando esta morto!
SECURE_DISABLED = [Olha-a-Faca] A venda de seguros estah desativada!
NOT_ENOUGH_MONEY = [Olha-a-Faca] Voce estah muito duro para comprar um seguro!
SECURED_MONEY = [Olha-a-Faca] Voce pagou $%d para proteger o seu dinheiro. Esfaqueadores nao poderao pegar seu dinheiro!


Thanks, credits added, I replaced Olha-a-Face with Knife Bounty just like in the rest of translations :)

OciXCrom 03-12-2017 10:26

Re: Knife Bounty + Secure (v1.2)
 
Why? It's a translation, so why change it?

edon1337 03-12-2017 10:40

Re: Knife Bounty + Secure (v1.2)
 
Quote:

Originally Posted by OciXCrom (Post 2503014)
Why? It's a translation, so why change it?

It changes the identity of the plugin.

FR0NTLINE 03-18-2017 17:16

Re: Knife Bounty + Secure (v1.2)
 
gr8 idea i haven't seen anything like this made yet. good work.

Visinescu 03-18-2017 21:28

Re: Knife Bounty + Secure (v1.2)
 
Romanian
Code:

[ro]

VICTIM_SECURED = [Knife Bounty] Victima a fost Securizata !
VICTIM_DIDNT_LOSE = [Knife Bounty] Nu ai pierdut banii deoarece ai fost Securizat !
VICTIM_MONEY_LOW = [Knife Bounty] Banii victimei erau scazuti, Nu ai castigat nimic !
ATTACKER_BOUNTY = [Knife Bounty] Ai luat Recomenpsa lui %s de $%d !
VICTIM_LOST_MONEY = [Knife Bounty] %s Ti-a luat Recompensa de $%d !
SECURE_AD = [Knife Bounty] Sa-ti securizezi banii scrie /secure !
CANT_SECURE_DEAD = [Knife Bounty] Nu poti sa te securizezi in timp ce esti mort !
SECURE_DISABLED = [Knife Bounty] Securitatea este momentan oprita !
NOT_ENOUGH_MONEY = [Knife Bounty] Nu ai destui bani sa te securizezi !
SECURED_MONEY = [Knife Bounty] Ai platit $%d sa-ti securizezi banii, Nu-ti vei pierde banii daca esti injunghiat !


HamletEagle 03-19-2017 05:38

Re: Knife Bounty + Secure (v1.2)
 
PHP Code:

if( ! get_pcvar_numg_iCvars] ) ) 
    return 
HAM_IGNORED ;
    
    if( ! ( 
is_valid_connectedattacker ) || is_valid_connectedvictim ) ) )
    return 
HAM_IGNORED ;
    
    if( 
get_user_weaponattacker ) != CSW_KNIFE 
    return 
HAM_IGNORED ;

    if( 
attacker == victim )
    return 
HAM_IGNORED 

Indent your code properly. It's nice to always use { } , even for single line, but that's only my opinion. Do it how you want, but indent properly.

PHP Code:

if( attacker == victim )
return 
HAM_IGNORED 

This check looks reduntant. You can't kill yourself with the knife.

I would add a is_user_connected check in client_putinserver.

PHP Code:

if( ! ( get_pcvar_numg_iCvars] ) ) ) 

Way too many spaces. Without extra spaces code looks better and it's easier to read:
PHP Code:

if(!get_pcvar_num(g_iCvars[1])) 

Also notice that the ( after ! is not needed.

edon1337 03-19-2017 08:44

Re: Knife Bounty + Secure (v1.2)
 
Quote:

Originally Posted by HamletEagle (Post 2504760)
Indent your code properly. It's nice to always use { } , even for single line, but that's only my opinion. Do it how you want, but indent properly.

It's already indented?

Quote:

Originally Posted by HamletEagle (Post 2504760)
PHP Code:

if( ! ( get_pcvar_numg_iCvars] ) ) ) 

Way too many spaces. Without extra spaces code looks better and it's easier to read:
PHP Code:

if(!get_pcvar_num(g_iCvars[1])) 

Also notice that the ( after ! is not needed.

It's a style of coding, I removed the extra '('.

Quote:

Originally Posted by HamletEagle (Post 2504760)
[php]
I would add a is_user_connected check in client_putinserver.

Done.

Quote:

Originally Posted by HamletEagle (Post 2504760)
PHP Code:

if( attacker == victim )
return 
HAM_IGNORED 

This check looks reduntant. You can't kill yourself with the knife.

Somehow, I forgot to upload the version without that check, no idea how but I didn't have that in my latest version in desktop.

Thanks!

@Visinescu

Thanks, credits added.


All times are GMT -4. The time now is 02:05.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.