It is currently 21 May 2018 23:55






Reply to topic  [ 3 posts ] 
 Intrebare x2 
Author Message
Membru, skill +1
Membru, skill +1
User avatar

Joined: 20 Dec 2015 09:25
Posts: 115
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Cum as putea face ca boolean-ul sa il pun pentru register_clcmd("say /model", "admin") adevarat/fals? mai exact sa fac boolean-ul daca il pun fals sa nu mai poata fi folosit,si daca pun true sa poata
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
//#include <colorchat>


#define PLUGIN "modele"
#define VERSION "1.0"
#define AUTHOR "appLy."

new bool: preparing

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /model", "admin")
}

public plugin_precache()
{
precache_model("models/player/skin1/skin1.mdl")
precache_model("models/player/skin2/skin2.mdl")
precache_model("models/player/skin3/skin3.mdl")
//precache_model("models/player/admin1/admin1.mdl")
//precache_model("models/player/admin2/admin2.mdl")
//precache_model("models/player/admin3/admin3.mdl")
}

public admin(id)
{
if (get_user_flags(id) & ADMIN_KICK)
{
model_menu(id)
}
else
{
//ColorChat(id, GREEN, "Nu esti owner/castigator")
zp_colored_print(id, "!yDoar !gowneri!y/!gcastigatori !ypot folosi aceasta !teamcomanda")
}

}
public model_menu(id)
{
new menu = menu_create("\rModelele mai jos", "menu_wybierz")
preparing= true

menu_additem(menu, "\wModel \yMineral Quantum", "1", 0)
menu_additem(menu, "\wModel \yHitman", "2", 0)
menu_additem(menu, "\wModel \yAgent 007", "3", 0)
//menu_additem(menu, "\wModel \yDodatkowy1", "4", 0)
//menu_additem(menu, "\wModel \yDodatkowy2", "5", 0)
//menu_additem(menu, "\wModel \yDodatkowy3", "6", 0)


menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)

menu_display(id, menu, 0)
}

public menu_wybierz(id, menu, item)
{
if(preparing ==true)
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new acces, callback
menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)

new key = str_to_num(data)

switch(key)
{
case 1 : cs_set_user_model(id, "skin1")
case 2 : cs_set_user_model(id, "skin2")
case 3 : cs_set_user_model(id, "skin3")
//case 4 : cs_set_user_model(id, "admin1")
//case 5 : cs_set_user_model(id, "admin2")
//case 6 : cs_set_user_model(id, "admin3")
}
menu_destroy(menu)
return PLUGIN_HANDLED
}

stock zp_colored_print(const id,const input[], any:...)
{
new msg[191], players[32], count = 1;
vformat(msg,190,input,3);
replace_all(msg,190,"!g","^x04");// green
replace_all(msg,190,"!y","^x01");// normal
replace_all(msg,190,"!team","^x03");// team

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

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


22 Apr 2018 17:27
Profile multumesc WWW
Online
Jan Darmu'
Jan Darmu'
User avatar

Joined: 25 Aug 2014 21:31
Posts: 5562
Location: Ploiesti
Detinator Steam: Da
CS Status: Sunt de nota 10 da' n-am timp
SteamID: Jandarmeria
Reputatie: Fost Membru Club eXtreamCS ( o luna )
Fost Moderator ajutator
Fost Super Moderator
eXtream Mod
Intermediar
Nume anterior : Christmas,
A k c 3 n 7
Fond eXtream: 0
declaram o variabila globala

Code:
new bool:g_Enable[33]

in publicul admin teci linia

Code:
return g_Enable[id] ? PLUGIN_CONTINUE: PLUGIN_HANDLED


si sa zicem ca la spawn nu vrei sa functioneze

public PlayerSpawn(id)
Code:
g_Enable[id] = false

_________________
ImageImage

Lista intermediari
Nu ezita sa ma contactezi la 112 pentru interventii speciale: S.I.A.S
REGULI GENERALE
REGULILE SECTIUNII ANUNTURI


22 Apr 2018 17:36
Profile multumesc
Membru, skill +1
Membru, skill +1
User avatar

Joined: 20 Dec 2015 09:25
Posts: 115
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Si daca vreau sa fac legatura cu o variabila din alt plugin ?


22 Apr 2018 18:16
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 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