|M’enregistrer| FAQ Rechercher M’enregistrer Connexion
Nous sommes le 19 Avr 2014, 22:04




 Page 1 sur 1 [ 3 messages ] 
Auteur Message
 Sujet du message: Mode base builder 5.4
MessagePosté: 18 Déc 2011, 16:40 
Posteur confirmer
Posteur confirmer

Inscription: 17 Déc 2011, 11:08
Messages: 22
Mode base builder 5.4

Le mod basebuilder est un mode ou on peux construire sa base. Pendant que les Ct construisent les T attendent est regarde les CT construire a la fin du timme les zombies peuvent sortir et les CT ne peuvent plus construire

Cvar:

bb_build_time <#> (Def: 150) // Temp de construction(ct)
bb_zombie_health <#> (Def: 2500) //La vie des zombie
bb_calc_maxbase <0/1> (Def: 0) // Total max personne par base survivors rule (total cts / 3) = max per base) Displayed at round start.
bb_tournament_mode <0/1> (Def: 0) // Removes team balancing and auto-joiner to make tournaments easier to run
bb_show_moving <0/1> (Def: 1) // Shows current and previous mover of an object being looked at
bb_block_gravity <0/1> (Def: 0) // Drops objects to floor (prevents "air" bases), allows stacking
bb_pain_shock_free <0/1> (Def: 0) // Gives admins with kick ability no knockback to rush bases easier as a zombie
bb_max_move_dist <#> (Def: 960) // If distance > #, then the object cannot be selected
bb_min_move_dist <#> (Def: 25) // If distance < #, then the object is moved to bb_min_dist_set's distance (helps prevent sticking self)
bb_min_dist_set <#> (Def: 50) // Distance object moved to
bb_health_time <#> (Def: 12) // HUD time for the health HUD message
bb_roundtime <0/1> (Def: 9) // Temp en minute de la partie (Temp de construction + le temp de défense de base)
bb_rounds <0/1> (Def: 4) // Total rounds par maps
bb_reset_blocks <0/1> (Def: 1) // Remetre les bloc en place
bb_claim_mode <0/1> (Def: 0) // Turn on claim mode where the player can claim a piece and be the only one able to move it
bb_claim_max <#> (Def: 6) // Max number of objects to claim, 0 = no limit to claimable objects
bb_give_nades (Def: h) //Nades to give on gun selection h = HE, f = Flashbang s = Smoke
bb_weapons (Def: abcdeghijlmnqrstuvwx) // Liste des armes dans le menu guns

Scout: a
XM1014: b
Mac-10: c
AUG: d
UMP45: e
SG550: f
Galil: g
Famas: h
AWP: i
MP5: j
M249: k
M3: l
M4A1: m
TMP: n
G3SG1: o
SG552: p
AK-47: q
P90: r
P228: s
Dual Elites: t
Fiveseven: u
USP: v
Glock18: w
Deagle: x

Mode,maps

Le mode :

http://xts.blog.free.fr/public/basebuilder54.zip

les maps :

http://xts.blog.free.fr/public/map.rar
http://xts.blog.free.fr/public/map2.rar

Code :
Shop:

Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <engine>
 
#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )
#define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame
 
new bool:g_HasSuperKnife[33], bool:g_HasSpeed[33]
 
new grenade_ct, m249_ct, superknife_ct, gravity_ct, gravity_cost_ct, g3sg1_ct, smoke_ct, flash_ct
new vitesse_t, vitesse_cost_t, gravity_t, gravity_cost_t, superknife_t, knife_multiplier, g_iMaxPlayers
 
public plugin_init()
{
// Plugin Info
register_plugin("Shop Base Builder", "1.0", "xxxx")
 
// HAMSANDWICH
RegisterHam(Ham_TakeDamage, "player", "ham_TakeDamage_Pre")
RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1)
RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Player_ResetMaxSpeed", 1)
 
register_event("CurWeapon","checkWeapon","be","1=1")
 
// GetMaxPlayers
g_iMaxPlayers = get_maxplayers()
 
// Commandes
register_clcmd("say /shop", "shopmenu")
register_clcmd("say shop", "shopmenu")
register_concmd("shop", "shopmenu")
 
// Prix de chaque Item Menu CT
superknife_ct = register_cvar("shop_superknife_ct", "16000")
grenade_ct = register_cvar("shop_grenade_ct", "5000")
gravity_ct = register_cvar("shop_gravity_ct", "0.75")
flash_ct = register_cvar("shop_flash_ct", "2000")
smoke_ct = register_cvar("shop_smoke_ct", "2000")
g3sg1_ct = register_cvar("shop_g3sg1_ct", "14000")
gravity_cost_ct = register_cvar("shop_cost_gravity_ct", "12000")
m249_ct = register_cvar("shop_m249_ct", "10000")
 
// Prix de chaque Item Menu T
vitesse_t = register_cvar("shop_maxspeed_t", "200")
vitesse_cost_t = register_cvar("shop_cost_maxspeed_t", "6000")
gravity_cost_t = register_cvar("shop_cost_gravity_t", "12000")
gravity_t = register_cvar("shop_gravity_t", "0.75")
superknife_t = register_cvar("shop_superknife_t", "16000")
knife_multiplier = register_cvar("shop_knife_damage", "154")
}
 
public plugin_precache()
{
precache_model("models/furien_superknife.mdl")
}
 
public client_putinserver(id)
{
g_HasSuperKnife[id] = false
g_HasSpeed[id] = false
}
 
public shopmenu(id)
{
new menu
new menuText[32]
 
if ( cs_get_user_team(id) == CS_TEAM_CT )
{
menu = menu_create("Shop Menu [CT]", "menu_ct")
formatex( menuText, charsmax(menuText), "Grenade - [%d $]", get_pcvar_num(grenade_ct) )
menu_additem(menu, menuText, "1")
formatex( menuText, charsmax(menuText), "Grenade Flash - [%d $]", get_pcvar_num(flash_ct) )
menu_additem(menu, menuText, "2")
formatex( menuText, charsmax(menuText), "Smoke Grenade - [%d $]", get_pcvar_num(smoke_ct) )
menu_additem(menu, menuText, "3")
formatex( menuText, charsmax(menuText), "Gravity - [%d $]", get_pcvar_num(gravity_cost_ct) )
menu_additem(menu, menuText, "4")
formatex( menuText, charsmax(menuText), "G3SG1 - [%d $]", get_pcvar_num(g3sg1_ct) )
menu_additem(menu, menuText, "5")
formatex( menuText, charsmax(menuText), "Mitrailleuse - [%d $]", get_pcvar_num(m249_ct) )
menu_additem(menu, menuText, "6")
formatex( menuText, charsmax(menuText), "Super Cut - [%d $]", get_pcvar_num(superknife_ct) )
menu_additem(menu, menuText, "7")
menu_setprop(menu, MPROP_EXITNAME, "Sortir")
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu)
}
else
{
menu = menu_create("Shop Menu [T]:", "menu_terro")
formatex( menuText, charsmax(menuText), "Vitesse - [%d $]", get_pcvar_num(vitesse_cost_t) )
menu_additem(menu, menuText, "1")
formatex( menuText, charsmax(menuText), "Gravity - [%d $]", get_pcvar_num(gravity_cost_t) )
menu_additem(menu, menuText, "2")
formatex( menuText, charsmax(menuText), "Super Cut - [%d $]", get_pcvar_num(superknife_t) )
menu_additem(menu, menuText, "3")
menu_setprop(menu, MPROP_EXITNAME, "Sortir")
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu)
}
}
 
public menu_ct(id, menu, item)
{
if (item == MENU_EXIT) return PLUGIN_HANDLED
 
// Obtenir l'info de l'item
new info[3]
new access, callback
menu_item_getinfo(menu, item, access, info, 2, _, _, callback)
 
new key = str_to_num(info)
 
switch(key)
{
case 1:
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des ct quand tu es terro !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
if ( user_has_weapon(id, CSW_HEGRENADE) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu as déjà cet item !")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new grenade_count = get_pcvar_num(grenade_ct)
if ( user_money < grenade_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - grenade_count)
give_item(id, "weapon_hegrenade")
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter une^x03 Grenade^x01 !")
}
}
case 2:
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des ct quand tu es terro !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
if ( user_has_weapon(id, CSW_FLASHBANG) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu as déjà cet item !")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new flash_count = get_pcvar_num(flash_ct)
if ( user_money < flash_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - flash_count)
give_item(id, "weapon_flashbang")
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter une^x03 Flash grenade^x01 !")
}
}
case 3:
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des ct quand tu es terro !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04[Shop]^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
if ( user_has_weapon(id, CSW_SMOKEGRENADE) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu as déjà cet item !")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new smoke_count = get_pcvar_num(smoke_ct)
if ( user_money < smoke_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - smoke_count)
give_item(id, "weapon_smokegrenade")
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter une ^x03 SmokeGrenade ^x01!")
}
}
case 4:
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des ct quand tu es terro !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new gravity_count = get_pcvar_num(gravity_cost_ct)
if ( user_money < gravity_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - gravity_count)
set_user_gravity(id, get_pcvar_float(gravity_ct))
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter de la^x03 Gravity^x01 !")
}
}
case 5:
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des ct quand tu es terro !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
if ( user_has_weapon(id, CSW_G3SG1) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu as déjà cet item !")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new g3sg1_count = get_pcvar_num(g3sg1_ct)
if ( user_money < g3sg1_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - g3sg1_count)
strip_user_weapons(id)
give_item(id, "weapon_g3sg1")
cs_set_user_bpammo(id, CSW_G3SG1, 90)
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 50)
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter un^x03 G3SG1 ^x01 !")
}
}
case 6:
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des ct quand tu es terro !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
if ( user_has_weapon(id, CSW_M249) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu as déjà cet item !")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new m249_count = get_pcvar_num(m249_ct)
if ( user_money < m249_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - m249_count)
strip_user_weapons(id)
give_item(id, "weapon_m249")
cs_set_user_bpammo(id, CSW_M249, 250)
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 50)
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter une^x03 m249 ^x01 !")
}
}
case 7:
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des terros quand tu es terro !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
if ( g_HasSuperKnife[id] )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu as déjà cet item !")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new superknife_count = get_pcvar_num(superknife_ct)
if ( user_money < superknife_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - superknife_count)
g_HasSuperKnife[id] = true
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter un^x03 Super Couteau ^x01 !")
}
}
 
}
return PLUGIN_CONTINUE;
}
 
public menu_terro(id, menu, item)
{
if (item == MENU_EXIT) return PLUGIN_HANDLED
 
// Obtenir l'info de l'item
new info[3]
new access, callback
menu_item_getinfo(menu, item, access, info, 2, _, _, callback)
 
new key = str_to_num(info)
 
switch (key)
{
case 1:
{
if ( cs_get_user_team(id) == CS_TEAM_CT )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des terros quand tu es ct !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new vitesse_count = get_pcvar_num(vitesse_cost_t)
if ( user_money < vitesse_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - vitesse_count)
g_HasSpeed[id] = true
set_user_maxspeed ( id , get_pcvar_float ( vitesse_t ) )
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter de la ^x03 Vitesse ^x01 !")
}
}
case 2:
{
if ( cs_get_user_team(id) == CS_TEAM_CT )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des ct quand tu es ct !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new gravity_count = get_pcvar_num(gravity_cost_t)
if ( user_money < gravity_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - gravity_count)
set_user_gravity(id, get_pcvar_float(gravity_t) )
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter de la^x03 Gravity^x01 !")
}
}
case 3:
{
if ( cs_get_user_team(id) == CS_TEAM_CT )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux pas acheter un item des terros quand tu es ct !")
return PLUGIN_HANDLED
}
if ( !is_user_alive(id) )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu ne peux rien acheter quand tu es ^x03mort ^x01!")
return PLUGIN_HANDLED
}
if ( g_HasSuperKnife[id])
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu as déjà cet item !")
return PLUGIN_HANDLED
}
new user_money = cs_get_user_money(id)
new superknife_count = get_pcvar_num(superknife_t)
if ( user_money < superknife_count )
{
print_color(id, id, 0, "^x04X[T]S^x01 Tu n'as ^x03pas assez d'argent ^x01pour acheter cet item !")
return PLUGIN_HANDLED
}
else
{
cs_set_user_money(id, user_money - superknife_count)
g_HasSuperKnife[id] = true
print_color(id, id, 0, "^x04X[T]S^x01 Tu viens d'acheter un^x03 Super Couteau ^x01 !")
}
}
}
return PLUGIN_CONTINUE;
}
 
//Les degat augmenter du super knife
public ham_TakeDamage_Pre(victim, inflictor, attacker, Float:damage, damage_bits)
{
if ( IsPlayer(attacker) && g_HasSuperKnife[attacker] && inflictor == attacker && get_user_weapon(attacker) == CSW_KNIFE )
{
SetHamParamFloat( 4, damage * get_pcvar_float(knife_multiplier) )
}
}
 
public ham_PlayerSpawn_Post(id)
{
g_HasSuperKnife[id] = false
g_HasSpeed[id] = false
}
 
public Player_ResetMaxSpeed ( id )
{
if ( is_user_alive ( id ) && g_HasSpeed[id] && get_user_maxspeed ( id ) != 0.1 )
{
set_user_maxspeed ( id , get_pcvar_float ( vitesse_t ) )
}
}
 
// Model du superknife
public checkWeapon(id)
{
if(g_HasSuperKnife[id])
{
new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo)
 
if(Weapon == CSW_KNIFE)
{
entity_set_string(id, EV_SZ_viewmodel, "models/furien_superknife.mdl")
}
}
}
 
// Message colorés
public print_color(id, cid, color, const message[], any:...)
{
new msg[192]
vformat(msg, charsmax(msg), message, 5)
new param
if (!cid) return
else param = cid
new team[32]
get_user_team(param, team, 31)
switch (color)
{
case 0: msg_teaminfo(param, team)
case 1: msg_teaminfo(param, "TERRORIST")
case 2: msg_teaminfo(param, "CT")
case 3: msg_teaminfo(param, "SPECTATOR")
}
if (id) msg_saytext(id, param, msg)
else msg_saytext(0, param, msg)
if (color != 0) msg_teaminfo(param, team)
}
 
msg_saytext(id, cid, msg[])
{
message_begin(id ? MSG_ONE : MSG_ALL, get_user_msgid("SayText"), _, id)
write_byte(cid)
write_string(msg)
message_end()
}
 
msg_teaminfo(id, team[])
{
message_begin(MSG_ONE, get_user_msgid("TeamInfo"), _, id)
write_byte(id)
write_string(team)
message_end()
}


Pour que le shop marche il faut rajouter un skin fichier.mdl dans le dossier models Pour que le super marche sinon le plugin fera crach votre serveur/!\.



Fichiers joints:
map2.rar [1.58 Mio]
Téléchargé 40 fois
map.rar [967.19 Kio]
Téléchargé 52 fois
basebuilder54.zip [1.06 Mio]
Téléchargé 65 fois
Hors ligne
   
 
 Sujet du message: Re: Mode base builder 5.4
MessagePosté: 08 Fév 2012, 20:14 
Mega posteur
Mega posteur
Avatar de l’utilisateur

Inscription: 07 Fév 2012, 20:15
Messages: 59
Le shop on le met ou ?



_________________
Image
Hors ligne
   
 
 Sujet du message: Re: Mode base builder 5.4
MessagePosté: 08 Fév 2012, 23:22 
Administrateur
Administrateur

Inscription: 31 Déc 2010, 00:09
Messages: 384
Salut,
tu dois conserver la même arborescence que dans le zip basebuilder54.zip
Et rajouter le nom de l'amxx dans ton /addons/amxmodx/configs/plugins.ini



_________________
Image
Hors ligne
   
 
Afficher les messages postés depuis:  Trier par  
 Page 1 sur 1 [ 3 messages ] 


Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 5 invités


Vous ne pouvez pas poster de nouveaux sujets
Vous ne pouvez pas répondre aux sujets
Vous ne pouvez pas éditer vos messages
Vous ne pouvez pas supprimer vos messages
Vous ne pouvez pas joindre des fichiers

Rechercher:
Aller à:  

cron