EuroCs ComuniTy
 
AcasaPortalCalendarFAQCautareMembriGrupuriInregistrareConectare

Distribuiţi | 
 

 Cum unim 2 plugin-uri !

In jos 
AutorMesaj
Vizitato
Vizitator
Anonymous


MesajSubiect: Cum unim 2 plugin-uri !   Mier Dec 03, 2008 9:09 am

[color:4687=#0080ff][b]Nume:[/b][/color] [u][color:4687=#ff0000]Cum unim 2 plugin-uri diferite ![/color][/u]
[color:4687=#0080ff][b]Autor: [/b][/color][b][color:4687=#325375][Run]N!K3[/color][/b]
[color:4687=#40bf00][u]Pasul 1 :[/u][/color]
[list]
[*]Luam cele 2 plugin-uri.Eu am luat 2 simple :
[/list]amx_slay -->
[b]Code:[/b]
#include
#include

#define PLUGIN "Trash Plugin"
#define AUTHOR "FireW@ll"
#define VERSION "1.0"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_slay2","Slay",ADMIN_SLAY," - Slay a player"); // amx_slay exista deja in amxx...
}


public Slay(id,level,cid)
{
if(!cmd_access(id,level,cid, 2))
return PLUGIN_HANDLED;

new command[32]

read_argv(1, command, sizeof command -1);

new Player = cmd_target(id, command, 2);

if(!Player)
return PLUGIN_HANDLED;

if(is_user_admin(Player))
client_print(id, print_chat, "E admin....:P");
else
user_silentkill(Player)

return PLUGIN_HANDLED;
}


si amx_ss -->
[b]Code:[/b]
#include
#include

#define PLUGIN "Screenshot"
#define VERSION "1.x"
#define AUTHOR "AUTOR"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_concmd("amx_ss","admin_ss",ADMIN_KICK,"message");
}


public admin_ss(id,level,cid)
{
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;

new argument[32]
read_argv(1,argument,31)

new player = cmd_target(id,argument,31)
new hostname[64], tname[32], usrip[32], timer[32];
get_cvar_string("hostname",hostname,63);
get_user_name(player,tname,31);
get_user_ip(player,usrip,31);
get_time("%m/%d/%Y - %H:%M:%S", timer,31);

if(!player)
return PLUGIN_HANDLED;

client_print(player, print_chat, "* Un admin ti-a facut un poza !")
client_print(player, print_chat, "* Nick-ul tau: %s, IP-ul tau: %s",tname,usrip)
client_print(player, print_chat, "* Data si ora: %s - pe serverul %s",timer,hostname)
client_cmd(player,"snapshot")

return PLUGIN_HANDLED
}



[color:4687=#40bf00][u]Pasul 2 :[/u][/color]
[list]
[*]La pluginul amx_slay stergem urmatoarea parte:
[/list][b]Code:[/b]
return PLUGIN_HANDLED;
}


[list]
[*]La pluginul amx_ss stergem urmatoarea parte:
[/list][b]Code:[/b]
#include
#include

#define PLUGIN "Screenshot"
#define VERSION "1.x"
#define AUTHOR "AUTOR"



[color:4687=#40bf00][u]Pasul 3 :[/u][/color]
[list]
[*]Unim cele 2 plugin-uri fara partile care le-am sters si ar trebui sa fie asa:
[/list][b]Code:[/b]
#include
#include

#define PLUGIN "Trash Plugin"
#define AUTHOR "FireW@ll"
#define VERSION "1.0"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_slay2","Slay",ADMIN_SLAY," - Slay a player"); // amx_slay exista deja in amxx...
}


public Slay(id,level,cid)
{
if(!cmd_access(id,level,cid, 2))
return PLUGIN_HANDLED;

new command[32]

read_argv(1, command, sizeof command -1);

new Player = cmd_target(id, command, 2);

if(!Player)
return PLUGIN_HANDLED;

if(is_user_admin(Player))
client_print(id, print_chat, "E admin....:P");
else
user_silentkill(Player)

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_concmd("amx_ss","admin_ss",ADMIN_KICK,"message");
}


public admin_ss(id,level,cid)
{
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;

new argument[32]
read_argv(1,argument,31)

new player = cmd_target(id,argument,31)
new hostname[64], tname[32], usrip[32], timer[32];
get_cvar_string("hostname",hostname,63);
get_user_name(player,tname,31);
get_user_ip(player,usrip,31);
get_time("%m/%d/%Y - %H:%M:%S", timer,31);

if(!player)
return PLUGIN_HANDLED;

client_print(player, print_chat, "* Un admin ti-a facut un poza !")
client_print(player, print_chat, "* Nick-ul tau: %s, IP-ul tau: %s",tname,usrip)
client_print(player, print_chat, "* Data si ora: %s - pe serverul %s",timer,hostname)
client_cmd(player,"snapshot")

return PLUGIN_HANDLED
}



[b]
[/b][b][color:4687=#ff0000]
[*][/color][/b]Am facut acest mic tutorial la cererea unui utilizator de pe forum
Sus In jos
bIgBaNg
Web Master
Web Master
bIgBaNg

masculin
Numarul mesajelor : 227
Varsta : 26
Statusul meu : Citesc forumul:D:)))
Data de inscriere : 30/11/2008

MesajSubiect: Re: Cum unim 2 plugin-uri !   Mier Dec 03, 2008 9:51 am

gg bun tutorial!
Sus In jos
Vezi profilul utilizatorului http://eurocs.catsboard.com
+pc.3rror
Web Master
Web Master
+pc.3rror

masculin
Numarul mesajelor : 255
Varsta : 22
Statusul meu : Happy
Data de inscriere : 30/11/2008

MesajSubiect: Re: Cum unim 2 plugin-uri !   Mier Dec 03, 2008 11:41 am

esti bun frate gj
Sus In jos
Vezi profilul utilizatorului
Continut sponsorizat




MesajSubiect: Re: Cum unim 2 plugin-uri !   

Sus In jos
 
Cum unim 2 plugin-uri !
Sus 
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
EuroCs :: ..::Counter-Strike::.. :: Tutoriale-
Mergi direct la: