Raised This Month: $ Target: $400
 0% 

demande traduction et passage du plug en version amxx knife


  
 
 
Thread Tools Display Modes
Author Message
Mr.WHITE
Junior Member
Join Date: Jul 2004
Location: Bordeaux -France
Old 07-31-2004 , 22:46   demande traduction et passage du plug en version amxx knife
#1

encore moi, j'aimerai bioen que ce plug soit passé sur amxx, car j'aime pas l'autre plug sur le forum.
je laisse le code ici
Code:
/* AMX Mod script. 
* 
* Knife Arena 
*
* amx_knives 1 - restricts weapons to knives
* 					 0 - enables all weapons
* 
* NOTE: Plugin adminvote from AMX 0.9.x required!!!
*/  

#include <amxmod> 
#include <amxmisc> 

new bool:KnifeEnabled 
new option[2]

public amx_enableknife(id,level,cid) {
	if (!cmd_access(id,level,cid,1))
		return PLUGIN_HANDLED

	new arg1[4]
	read_argv(1,arg1,3)
	
	if (equal(arg1,"1")||equali(arg1,"on")){
		KnifeEnabled = true
		unpause("b","switchweapon")
	}
	else if (equal(arg1,"0")||equali(arg1,"off")){
		KnifeEnabled = false
		pause("b","switchweapon")
	}
	else {
		console_print(id,"Knives Only Mode is %s",KnifeEnabled ? "enabled" : "disabled")
		return PLUGIN_HANDLED
	}

	console_print(id,"Knives Only Mode %s",KnifeEnabled ? "enabled" : "disabled")
	client_print(0,print_center,"Knives Only Mode Has Been %s!",KnifeEnabled ? "Enabled" : "Disabled")
	
	engclient_cmd(0,"weapon_knife")
			
	set_hudmessage(0, 100, 0, 0.05, 0.65, 2, 0.02, 10.0, 0.01, 0.1, 2)	
	show_hudmessage(0,KnifeEnabled ? "Knives Only Allowed" : "All Guns Allowed" )
	return PLUGIN_HANDLED
}  

public switchweapon(id)
	engclient_cmd(id,"weapon_knife")

new votepistols[] = "\yAMX %s Knives Only Mode?\w^n^n1. Yes^n2. No"

public vote_knives(id){
	new Float:voting = get_cvar_float("amx_last_voting")
	if (voting > get_gametime()){ 
		client_print(id,print_chat,"* There is already one voting...") 
		return PLUGIN_HANDLED 
	} 
	if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) { 
		client_print(id,print_chat,"* Voting not allowed at this time...") 
		return PLUGIN_HANDLED 
	}
	new menu_msg[256]
	format(menu_msg,255,votepistols,KnifeEnabled ? "Disable" : "Enable")
	new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0 
	set_cvar_float("amx_last_voting",  get_gametime() + vote_time )
	show_menu(0,(1<<0)|(1<<1),menu_msg,floatround(vote_time))
	set_task(vote_time,"check_votes")
	client_print(0,print_chat,"* Voting has started...") 
	option[0]=option[1]=0
	return PLUGIN_HANDLED 	
}

public vote_count(id,key){ 
	if ( get_cvar_float("amx_vote_answers") ) { 
		new name[32] 
		get_user_name(id,name,31)
		client_print(0,print_chat,"* %s voted %s", name, key ? "against" : "for" )
	}
	++option[key]
	return PLUGIN_HANDLED
} 

public check_votes(id){
	if (option[0] > option[1]){
		server_cmd(  "amx_knives %s", KnifeEnabled ? "off" : "on" )
		client_print(0,print_chat,"* Voting successful (yes ^"%d^") (no ^"%d^").",option[0],option[1])
	}
	else{
		client_print(0,print_chat,"* Voting failed (yes ^"%d^") (no ^"%d^").",option[0],option[1])
	}
	return PLUGIN_CONTINUE
}

public plugin_init() {  
	register_plugin("Knife Arena","0.9","tcquest78")
	register_event("CurWeapon","switchweapon","be","1=1","2!29")
	register_concmd("amx_knives","amx_enableknife",ADMIN_LEVEL_B,"<1|0> - knives only mode")
	register_clcmd("say /voteknives","vote_knives",0,"- start voting session for knives only mode")
	register_menucmd(register_menuid("Knives Only Mode?"),(1<<0)|(1<<1),"vote_count")
	pause("b","switchweapon")
	return PLUGIN_CONTINUE
merci de votre aide.
Mr.WHITE is offline
Cr3V3TT3
Senior Member
Join Date: Jul 2004
Location: V'dauban
Old 08-01-2004 , 00:32  
#2

Ami du soir bonsoir

C est pas une trad google c est juste que l anglais jmaitrise pas trop mais bon ca devrait suffir

J l ai pas tester pcq il fo vraiment que jaille me coucher la
Mais ya pas d erreur de compil
Attached Files
File Type: sma Get Plugin or Get Source (knives.sma - 1077 views - 3.2 KB)
Cr3V3TT3 is offline
Send a message via MSN to Cr3V3TT3
Parakeet
Junior Member
Join Date: May 2004
Old 08-01-2004 , 07:20  
#3

egalement dispo ici:
http://cyberguerrier.free.fr/amxcodi...topic.php?t=32
__________________
french AMX/AMXX Community
Pour des traductions compatibles AMX et AMXX:
http://cyberguerrier.free.fr/amxcodingV2/index.php
Parakeet is offline
android
New Member
Join Date: Jun 2004
Old 08-04-2004 , 18:12  
#4

Tiens voilà ma traduction de ce plugin...
Je m'efforce de traduire des plugins sans fautes d'orthographe.

Code:
/* AMX Mod script. 
* 
* Knife Arena 
*
* amx_knives 1 - restricts weapons to knives
* 		0 - enables all weapons
* 
* NOTE: Plugin adminvote from AMX 0.9.x required!!!
*/  

#include <amxmod> 
#include <amxmisc> 

new bool:KnifeEnabled 
new option[2]

public amx_enableknife(id,level,cid) {
	if (!cmd_access(id,level,cid,1))
		return PLUGIN_HANDLED

	new arg1[4]
	read_argv(1,arg1,3)
	
	if (equal(arg1,"1")||equali(arg1,"on")){
		KnifeEnabled = true
		unpause("b","switchweapon")
	}
	else if (equal(arg1,"0")||equali(arg1,"off")){
		KnifeEnabled = false
		pause("b","switchweapon")
	}
	else {
		console_print(id,"Le mode Couteau est %s",KnifeEnabled ? "active" : "desactive")
		return PLUGIN_HANDLED
	}

	console_print(id,"Mode Couteau %s",KnifeEnabled ? "active" : "desactive")
	client_print(0,print_center,"Le Mode Couteau a ete %s !",KnifeEnabled ? "Active" : "Desactive")
	
	engclient_cmd(0,"weapon_knife")
			
	set_hudmessage(0, 100, 0, 0.05, 0.65, 2, 0.02, 10.0, 0.01, 0.1, 2)	
	show_hudmessage(0,KnifeEnabled ? "Seulement le Couteau est permis !" : "Toutes les armes sont permises" )
	return PLUGIN_HANDLED
}  

public switchweapon(id)
	engclient_cmd(id,"weapon_knife")

new votepistols[] = "\yAMX %s le mode Couteau ?\w^n^n1. Oui^n2. Non"

public vote_knives(id){
	new Float:voting = get_cvar_float("amx_last_voting")
	if (voting > get_gametime()){ 
		client_print(id,print_chat,"* Deja un vote en cours...") 
		return PLUGIN_HANDLED 
	} 
	if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) { 
		client_print(id,print_chat,"* Vote non disponible pour le moment...") 
		return PLUGIN_HANDLED 
	}
	new menu_msg[256]
	format(menu_msg,255,votepistols,KnifeEnabled ? "DESACTIVER" : "ACTIVER")
	new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0 
	set_cvar_float("amx_last_voting",  get_gametime() + vote_time )
	show_menu(0,(1<<0)|(1<<1),menu_msg,floatround(vote_time))
	set_task(vote_time,"check_votes")
	client_print(0,print_chat,"* Le vote a commence...") 
	option[0]=option[1]=0
	return PLUGIN_HANDLED 	
}

public vote_count(id,key){ 
	if ( get_cvar_float("amx_vote_answers") ) { 
		new name[32] 
		get_user_name(id,name,31)
		client_print(0,print_chat,"* %s vote %s", name, key ? "CONTRE" : "POUR" )
	}
	++option[key]
	return PLUGIN_HANDLED
} 

public check_votes(id){
	if (option[0] > option[1]){
		server_cmd(  "amx_knives %s", KnifeEnabled ? "off" : "on" )
		client_print(0,print_chat,"* Le vote a reussi (oui ^"%d^") (non ^"%d^").",option[0],option[1])
	}
	else{
		client_print(0,print_chat,"* Le vote a echoue (oui ^"%d^") (non ^"%d^").",option[0],option[1])
	}
	return PLUGIN_CONTINUE
}

public plugin_init() {  
	register_plugin("Knife Arena","0.9","tcquest78")
	register_event("CurWeapon","switchweapon","be","1=1","2!29")
	register_concmd("amx_knives","amx_enableknife",ADMIN_LEVEL_B,"<1|0> - Activer / desactiver le mode Couteau")
	register_clcmd("say /voteknives","vote_knives",0,"- Lancer un vote pour activer le mode Couteau")
	register_menucmd(register_menuid("mode Couteau ?"),(1<<0)|(1<<1),"vote_count")
	pause("b","switchweapon")
	return PLUGIN_CONTINUE
}
Compile-le avec AMXx.
enjoy
android is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:24.


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