[Rezolvat!] plugin ghiceste nr

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Kyal
Membru, skill 0
Membru, skill 0
Posts: 46
Joined: 01 Sep 2018, 19:50
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

30 Oct 2018, 20:45

Salut,nu stiu daca este un model gen Tip plugin..Info,nu am gasit. Voi explica pe scurt ce ma intereseaza.
Cu o comanda gen amx_numar "5" setez nr 5.
Apoi primul care scrie pe chat 5 castiga.. Apare un mesaj pe chat x a castigat..
Olium
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2040
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 330 times
Contact:

30 Oct 2018, 21:57

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

new numar

public plugin_init()
{
	register_clcmd("amx_numar","Public",ADMIN_CVAR,"amx_numar <numar>")

	register_clcmd("say","Say")
	register_clcmd("say_team","Say")
}

public Public(id,level,cid)
{
	if(!cmd_access(id,level,cid,1))	return console_print(id,"[AMXX]: Nu ai acces!")

	new arg1[32]
	read_argv(1,arg1,charsmax(arg1))
	remove_quotes(arg1)

	if(equali(arg1,"")||!str_to_num(arg1))	return console_print(id,"[AMXX]: Format incorect!")

	numar=str_to_num(arg1)

	return PLUGIN_HANDLED
}

public Say(id)
{
	new args[195],name[32]
	read_args(args,charsmax(args))

        if(!args[0])	return PLUGIN_CONTINUE

	remove_quotes(args[0])
	get_user_name(id,name,charsmax(name))

	if(str_to_num(args)==numar&&numar)	client_print(0,print_chat,"[AMXX]: Se pare ca %s tocmai a ghicit numarul norocos.",name)

	return PLUGIN_CONTINUE
}
Kyal
Membru, skill 0
Membru, skill 0
Posts: 46
Joined: 01 Sep 2018, 19:50
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

30 Oct 2018, 23:09

e bun. Nu am cuvinte sa-ti multumesc. Il mai colorez eu si e perfect.
Kyal
Membru, skill 0
Membru, skill 0
Posts: 46
Joined: 01 Sep 2018, 19:50
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

30 Oct 2018, 23:12

e bun. Nu am cuvinte sa-ti multumesc. Il mai colorez eu si e perfect.
Dar o sg problema. Dupa ce ghiceste nr sa se inchia numaru,
Adica daca scriu eu nr odata dupa mine mai scriu inca 10..sau macar sa pot opri eu ca ramane activ..Asa dupa 10ore cine scrie numaru apare pe chat
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2040
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 330 times
Contact:

30 Oct 2018, 23:21

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

new numar,bool:blocked

public plugin_init()
{
	register_clcmd("amx_numar","Public",ADMIN_CVAR,"amx_numar <numar>")

	register_clcmd("say","Say")
	register_clcmd("say_team","Say")
}

public Public(id,level,cid)
{
	if(!cmd_access(id,level,cid,1))	return console_print(id,"[AMXX]: Nu ai acces!")

	new arg1[32]
	read_argv(1,arg1,charsmax(arg1))
	remove_quotes(arg1)

	if(equali(arg1,"")||!str_to_num(arg1))	return console_print(id,"[AMXX]: Format incorect!")

	numar=str_to_num(arg1)

	if(blocked)	blocked=false

	return PLUGIN_HANDLED
}

public Say(id)
{
	new args[195],name[32]
	read_args(args,charsmax(args))

        if(!args[0])	return PLUGIN_CONTINUE

	remove_quotes(args[0])
	get_user_name(id,name,charsmax(name))

	if(str_to_num(args)==numar&&numar&&!blocked)
	{
		client_print(0,print_chat,"[AMXX]: Se pare ca %s tocmai a ghicit numarul norocos.",name)

		blocked=true
	}

	return PLUGIN_CONTINUE
}
Kyal
Membru, skill 0
Membru, skill 0
Posts: 46
Joined: 01 Sep 2018, 19:50
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

30 Oct 2018, 23:29

Daca ai putea doar sa faci textul de la mesaj coloarat iar castigatorul cu verde. Eu chiar nu stiu..am incercat dar. Apoi se poate da t/c
Multumesc
User avatar
Jah#
Super moderator
Super moderator
Posts: 1432
Joined: 26 Jan 2016, 10:24
Detinator Steam: Da
CS Status: segmentation fault
SteamID: /ID/gypower
Reputatie: Super moderator
Membru Club eXtreamCS (3 luni)
Fond eXtream: 0
Location: Chişinău, Republic Of Moldova
Has thanked: 5 times
Been thanked: 1 time

31 Oct 2018, 11:44

Marcat ca Rezolvat!
Tranzactii efectuate cu succes.
| Afiseaza codul
anunturi/vand-cont-rockstar-gta-15euro- ... 49363.html
anunturi/vand-cont-rockstar-gta-euro-paypal-t349373.html
anunturi/cumpar-tema-ipb-t349335.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-60.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-72.html
post2692853.html#p2692853
anunturi/addons-furien-classic-cyby-t348802.html
Image
| Afiseaza codul
Image
Image
Activez mai rar, munca :)
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2040
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 330 times
Contact:

05 Nov 2018, 11:14

COLOR | Afiseaza codul
#include <amxmodx>
#include <amxmisc>

new numar,bool:blocked

public plugin_init()
{
	register_clcmd("amx_numar","Public",ADMIN_CVAR,"amx_numar <numar>")

	register_clcmd("say","Say")
	register_clcmd("say_team","Say")
}

public Public(id,level,cid)
{
	if(!cmd_access(id,level,cid,1))	return console_print(id,"[AMXX]: Nu ai acces!")

	new arg1[32]
	read_argv(1,arg1,charsmax(arg1))
	remove_quotes(arg1)

	if(equali(arg1,"")||!str_to_num(arg1))	return console_print(id,"[AMXX]: Format incorect!")

	numar=str_to_num(arg1)

	if(blocked)	blocked=false

	return PLUGIN_HANDLED
}

public Say(id)
{
	new args[195],name[32]
	read_args(args,charsmax(args))

        if(!args[0])	return PLUGIN_CONTINUE

	remove_quotes(args[0])
	get_user_name(id,name,charsmax(name))

	if(str_to_num(args)==numar&&numar&&!blocked)
	{
		xCoLoR(0,"!e[AMXX]: Se pare ca!v %s!e tocmai a ghicit numarul norocos.",name)

		blocked=true
	}

	return PLUGIN_CONTINUE
}

stock xCoLoR(id, String[], any:...) 
{
	static szMesage[192];
	vformat(szMesage, charsmax(szMesage), String, 3);
	
	replace_all(szMesage, charsmax(szMesage), "!n", "^1");
	replace_all(szMesage, charsmax(szMesage), "!e", "^3");
	replace_all(szMesage, charsmax(szMesage), "!v", "^4");
	replace_all(szMesage, charsmax(szMesage), "!e2", "^0");
	
	static g_msg_SayText = 0;
	if(!g_msg_SayText)	g_msg_SayText = get_user_msgid("SayText");
	
	new Players[32], iNum = 1, i;

 	if(id) Players[0] = id;
	else get_players(Players, iNum, "ch");
	
	for(--iNum; iNum >= 0; iNum--) 
	{
		i = Players[iNum];
		
		message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
		write_byte(i);
		write_string(szMesage);
		message_end();
	}
}
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests