It is currently 24 Feb 2019 03:09






Reply to topic  [ 4 posts ] 
 Shop Furien Antifurien Limita de folosire [Rezolvat] 
Author Message
Membru, skill 0
Membru, skill 0

Joined: 10 Jan 2019 02:21
Posts: 35
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Imi puteti baga o limita la shop sa se poata folosi de catre furien si antifurien doar de 4 ori pe runda

https://ufile.io/6aj62 aici e sma de la shop

Multumesc frumos !


Last edited by cs_all on 15 Feb 2019 23:30, edited 1 time in total.

Marcat ca "Rezolvat"



12 Feb 2019 16:57
Profile multumesc WWW
Membru, skill 0
Membru, skill 0

Joined: 10 Jan 2019 02:21
Posts: 35
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
UP , e cineva ce stie si are timp ?


14 Feb 2019 18:07
Profile multumesc WWW
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 13:25
Posts: 2921
Location: Gura Humorului
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <engine>
#include <fakemeta_util>
#include < hamsandwich >

#define PLUGIN_NAME "Furien Shop"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "AlliedMods"

#define FURIEN_VIP ADMIN_LEVEL_H
#define IsPlayer(%0) ( 1 <= %0 <= g_iMaxPlayers )
new g_iMaxPlayers;
new has_no_flash[33]
new has_model[33]

new limitact[33], limitat[33];

new const models[][] = { "models/v_superknife.mdl", "models/v_superknifeVIP.mdl" }

new g_msgScreenFade
new const prefix[] = { "!g[!tShop!g]!n" }

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

register_clcmd("say /shop", "shop")
register_clcmd("say_team /shop", "shop")
register_clcmd("say shop", "shop")
register_clcmd("say_team shop", "shop")
RegisterHam( Ham_Item_Deploy, "weapon_knife", "Ham_KnifeDeployPost", 1 );
register_event("DeathMsg", "deathmsg", "a");
register_event("ScreenFade", "eventFlash", "be", "4=255", "5=255", "6=255", "7>199")
register_event("HLTV", "event_NewRound", "a", "1=0", "2=0");
RegisterHam( Ham_TakeDamage, "player", "Player_TakeDamage" );
g_iMaxPlayers = get_maxplayers ( );
g_msgScreenFade = get_user_msgid("ScreenFade")
}

public event_NewRound()
{
arrayset(limitact, 0, charsmax(limitact));
arrayset(limitat, 0, charsmax(limitat));
}

public deathmsg(){
new ivictim = read_data(2);
has_no_flash[ivictim] = false;
has_model[ivictim]=false;
}

public Player_TakeDamage( iVictim, iInflictor, iAttacker, Float:fDamage )
{
if ( iInflictor == iAttacker && IsPlayer ( iAttacker ) && has_model[ iAttacker ] )
{
if(get_user_flags(iAttacker) & FURIEN_VIP)
SetHamParamFloat ( 4, fDamage * 4.0 );
else
SetHamParamFloat ( 4, fDamage * 2.0 );
return HAM_HANDLED;
}

return HAM_IGNORED;

}

public Ham_KnifeDeployPost( iEnt )
{
new id = get_pdata_cbase( iEnt, 41 );
if(has_model[id])
entity_set_string( id, EV_SZ_viewmodel, get_user_flags(id) & FURIEN_VIP ? models[1] : models[0]);
}

public client_disconnect(id){

has_no_flash[id] = false;
has_model[id]=false;

}

public client_connect(id){

has_no_flash[id] = false;
has_model[id]=false;
limitact[id] = 0;
limitat[id] = 0;
}

public plugin_precache() {
precache_model(models[0])
precache_model(models[1])

}

public eventFlash(id)
{
if(has_no_flash[id])
{
message_begin(MSG_ONE, g_msgScreenFade, {0,0,0}, id)
write_short(1)
write_short(1)
write_short(1)
write_byte(0)
write_byte(0)
write_byte(0)
write_byte(255)
message_end()
}
}


public shop(id)
{
if(!is_user_alive(id))
{
client_printc(id, "%s Trebuie sa fi in viata ca sa folosesti !gShop-ul!n!", prefix);
return PLUGIN_HANDLED
}

switch(cs_get_user_team(id))
{
case CS_TEAM_CT:
AFURIEN(id);

case CS_TEAM_T:
FURIEN(id);
}
return PLUGIN_HANDLED;
}


public FURIEN(id)
{
if(!is_user_alive(id))
{
client_printc(id, "%s Trebuie sa fi in viata ca sa folosesti !gShop-ul!n!", prefix);
return PLUGIN_HANDLED
}

if(limitat[id] == 4)
{
client_printc(id, "%s Nu poti cumpara mai mult de!g 4 articole/runda!n.", prefix);
return PLUGIN_HANDLED
}

new menu = menu_create("FURIEN Shop", "shop_furien");

menu_additem(menu, "\ySuper Knife \r[\w10000$\r] ", "1", 0);
menu_additem(menu, "\yHE Grenade \r[\w3000$\r] ", "2", 0);
menu_additem(menu, "\y+50 HP \r[\w3000$\r] ", "3", 0);
menu_additem(menu, "\y+50 AP \r[\w500$\r] ", "4", 0);
menu_additem(menu, "\yNo Flash \r[\w1000$\r] ", "5", 0);
//menu_additem(menu, "\ySuper Knife VIP \r[\wFREE\r] ", "6", 0);

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);

return PLUGIN_HANDLED
}

public shop_furien(id, menu, item)
{
if(!is_user_alive(id))
{
client_printc(id, "%s Trebuie sa fi in viata ca sa folosesti !gShop-ul!n!", prefix);
return PLUGIN_HANDLED
}

if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);

new key = str_to_num(data);
new tmp_money = cs_get_user_money(id)

switch(key)
{
case 1:
{
if(tmp_money < 10000)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}
if(has_model[id])
{
client_printc(id, "%s Ai deja !gSuperKnife!n!", prefix);
return PLUGIN_HANDLED;
}
has_model[id]=true;
if(get_user_weapon( id ) == CSW_KNIFE)
set_pev(id, pev_viewmodel2, models[0])
cs_set_user_money(id, tmp_money - 10000)
client_printc(id, "%s Ai cumparat !gSuper!tKnife!n!", prefix);
limitat[id]++;
}
case 2:
{
if(tmp_money < 3000)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}

if(user_has_weapon(id, CSW_HEGRENADE))
{
client_printc(id, "%s Ai deja !gHe!tGrenade!n!", prefix);
return PLUGIN_HANDLED;
}

give_item(id, "weapon_hegrenade")
cs_set_user_money(id, tmp_money - 3000)
client_printc(id, "%s Ai cumparat !gHe!tGrenade!n!", prefix);
limitat[id]++;

}
case 3:
{
if(tmp_money < 3000)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}

new health = get_user_health(id);

if(health >= 200){
client_printc(id, "%s Nu poti cumpara mai mult de !g200!t HP", prefix);
return PLUGIN_HANDLED;
}
health+=50;

set_user_health(id, clamp(health,0,200) == 200 ? 200 : health)

cs_set_user_money(id, tmp_money - 3000)
client_printc(id, "%s Ai cumparat !g+50!tHP!n!", prefix);
limitat[id]++;
}
case 4:
{

if(tmp_money < 500)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}

new armor = get_user_armor(id);

if(armor >= 300){
client_printc(id, "%s Nu poti cumpara mai mult de !g300!t AP", prefix);
return PLUGIN_HANDLED;
}
armor+=50

set_user_armor(id, clamp(armor,0,300) == 300 ? 300 : armor)

cs_set_user_money(id, tmp_money - 500)
client_printc(id, "%s Ai cumparat !g+50!tAP!n!", prefix);
limitat[id]++;
}
case 5:
{
if(tmp_money < 1000)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}

has_no_flash[id]=true;
cs_set_user_money(id, tmp_money - 1000)
client_printc(id, "%s Ai cumparat !gNo!tFlash!n!", prefix);
limitat[id]++;
}
case 6:
{
if(get_user_flags(id) & FURIEN_VIP)
{
if(has_model[id])
{
client_printc(id, "%s Ai deja !gSuperKnife!n!", prefix);
return PLUGIN_HANDLED;
}
client_printc(id, "%s Ai ales !gSuper!tKnife!gV!nI!gP!n!", prefix);
has_model[id]=true;
if(get_user_weapon( id ) == CSW_KNIFE)
set_pev(id, pev_viewmodel2, models[1])
limitat[id]++;
}
}

}

menu_destroy(menu);
return PLUGIN_HANDLED;
}

public AFURIEN(id)
{
if(!is_user_alive(id))
{
client_printc(id, "%s Trebuie sa fi in viata ca sa folosesti !gShop-ul!n!", prefix);
return PLUGIN_HANDLED
}

if(limitact[id] == 4)
{
client_printc(id, "%s Nu poti cumpara mai mult de!g 4 articole/runda!n.", prefix);
return PLUGIN_HANDLED
}

new menu = menu_create("Anti-Furien Shop", "shop_afurien");

menu_additem(menu, "\yDefuse Kit \r[\w500$\r] ", "1", 0);
menu_additem(menu, "\yHE Grenade \r[\w3000$\r] ", "2", 0);
menu_additem(menu, "\y+50 HP \r[\w3000$\r] ", "3", 0);
menu_additem(menu, "\y+50 AP \r[\w500$\r] ", "4", 0);
menu_additem(menu, "\yNo Flash \r[\w10000$\r] ", "5", 0);

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);

return PLUGIN_HANDLED
}

public shop_afurien(id, menu, item)
{
if(!is_user_alive(id))
{
client_printc(id, "%s Trebuie sa fi in viata ca sa folosesti !gShop-ul!n!", prefix);
return PLUGIN_HANDLED
}

if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);

new key = str_to_num(data);
new tmp_money = cs_get_user_money(id)

switch(key)
{
case 1:
{
if(tmp_money < 500)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}

if(cs_get_user_defuse(id))
{
client_printc(id, "%s Ai deja !gDefuse!tKIT!n!", prefix);
return PLUGIN_HANDLED;
}

cs_set_user_money(id, tmp_money - 500)
give_item(id, "item_thighpack");
give_item(id, "item_assaultsuit");
client_printc(id, "%s Ai cumparat !gDefuse!tKIT!n!", prefix);
limitact[id]++;
}
case 2:
{
if(tmp_money < 3000)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}

if(user_has_weapon(id, CSW_HEGRENADE))
{
client_printc(id, "%s Ai deja !gHe!tGrenade!n!", prefix);
return PLUGIN_HANDLED;
}

give_item(id, "weapon_hegrenade")
cs_set_user_money(id, tmp_money - 3000)
client_printc(id, "%s Ai cumparat !gHe!tGrenade!n!", prefix);
limitact[id]++;

}
case 3:
{
if(tmp_money < 3000)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}

new health = get_user_health(id);

if(health >= 200){
client_printc(id, "%s Nu poti cumpara mai mult de !g200!t HP", prefix);
return PLUGIN_HANDLED;
}
health+=50;

set_user_health(id, clamp(health,0,200) == 200 ? 200 : health)
cs_set_user_money(id, tmp_money - 3000)
client_printc(id, "%s Ai cumparat !g+50!tHP!n!", prefix);
limitact[id]++;
}
case 4:
{

if(tmp_money < 500)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}

new armor = get_user_armor(id);

if(armor >= 300){
client_printc(id, "%s Nu poti cumpara mai mult de !g300!t AP", prefix);
return PLUGIN_HANDLED;
}
armor+=50

set_user_armor(id, clamp(armor,0,300) == 300 ? 300 : armor);

cs_set_user_money(id, tmp_money - 500)
client_printc(id, "%s Ai cumparat !g+50!tAP!n!", prefix);
limitact[id]++;
}
case 5:
{
if(tmp_money < 1000)
{
client_printc(id, "%s Nu ai suficienti !gbani!n!", prefix);
return PLUGIN_HANDLED;
}
has_no_flash[id]=true;
cs_set_user_money(id, tmp_money - 1000)
client_printc(id, "%s Ai cumparat !gNo!tFlash!n!", prefix);
limitact[id]++;
}
}

menu_destroy(menu);
return PLUGIN_HANDLED;
}

stock client_printc(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);

replace_all(msg, 190, "!g", "^x04"); // Green Color
replace_all(msg, 190, "!n", "^x01"); // Default Color
replace_all(msg, 190, "!t", "^x03"); // Team Color

if(id)
players[0] = id;
else
get_players(players, count, "ch");

for (new i = 0; i < count; i++)
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}


Nu mai posta in categoria scripting cereri pentru modificarea pluginurilor. Ai categorie speciala AICI

Mutat in categoria corespunzatoare

_________________
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș

Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage

Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu


15 Feb 2019 11:46
Profile multumesc YIM WWW
Membru, skill 0
Membru, skill 0

Joined: 10 Jan 2019 02:21
Posts: 35
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Multumesc foarte mult @YONTU


15 Feb 2019 22:49
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group