All About Gaming
 
AcasaCautareInregistrareConectare
Cautare
 
 

Rezultate pe:
 
Rechercher Cautare avansata
Top postatori
mas1NNNa
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
TeRmiNNNaTe
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
Alexz0r
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
TdG | OldDeath
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
Th3zone
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
TdG | OlDsCho0|^cS
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
XPPP-,-
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
eXxXE
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
adiiiy
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
xViBeR
Executare client EmptyExecutare client I_voting_barExecutare client Empty 
TdG ClaN
Navigare
Ceas
Parteneri
CStrike-ZoNe
Votati-ne
top65.ro top 90 TopSiteuri.ro - Adauga si site-ul tau - Director web
Radio VibeFM


Distribuiţi
 

 Executare client

In jos 
AutorMesaj
mas1NNNa
Administrator
Administrator
mas1NNNa

Mesaje : 526
Data de inscriere : 18/06/2011
Varsta : 22
Localizare : Navodari

Executare client Empty
MesajSubiect: Executare client   Executare client I_icon_minitimeMier Iul 20, 2011 6:01 am

Sallut la toti ! In acest tutorial va veti putea executa o comanda asupra unui jucator(client)

La inceput avem asa :
Cod:
/* Script generated by Pawn Studio */

#include
#include

#define PLUGIN "New Plugin"
#define AUTHOR "Unknown"
#define VERSION "1.0"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your own code here
}


Adaugam concmd

Cod:
register_concmd("comanda","public-ul",accesul de Admin,"Mesajul ce va aparea la amx_help")

la noi fiind -->
Cod:
register_concmd("amx_ss","ss",ADMIN_KICK,"- Faci snapshot unui jucator")


sa va reamintesc lista acceselor la admini
Cod:
ADMIN_SLAP
ADMIN_SLAY
ADMIN_KICK
ADMIN_BAN
ADMIN_MAP
ADMIN_CVAR
ADMIN_RCON
ADMIN_VOTE
ADMIN_CHAT
ADMIN_CFG
ADMIN_PASSWORD
ADMIN_IMMUNITY
ADMIN_RESERVATION
ADMIN_LEVEL_A
ADMIN_LEVEL_B
ADMIN_LEVEL_C
ADMIN_LEVEL_D
ADMIN_LEVEL_E
ADMIN_LEVEL_F
ADMIN_LEVEL_G
ADMIN_LEVEL_H


Acum adaugam publicul
Cod:
public ss(id,level,cid){

}


Acum sa verificam ca este admin adaugam
Cod:
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;


Acuma trebuie sa cream codul care va fi executat pe jucator, si cream un :

Cod:
new arg[32]
read_argv(1,arg,31)


Acum trebuie sa facem ca acest arg sa fie executat pe cineva
Cod:
new player = cmd_target(id,arg,1)


Acum verificam daca jucatorul este viu
Cod:
if(!is_user_alive(id))
return PLUGIN_HANDLED


Pana acum avem asa :
Cod:
public ss(id,level,cid){
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;

new arg[32]
read_argv(1,arg,31)
new player = cmd_target(id,arg,1)

if(!is_user_alive(id))
return PLUGIN_HANDLED

}


Acum cream comanda :
Cod:
client_cmd(player,"snapshot")
return PLUGIN_HANDLED


Pentru cei care zic de exp :
Cod:
Nu arata nicaieri ca a executat poza Neutral
Nu arata numele la admin
Nu arata numele la jucator


Unde aveam --> | Adaugam asta deasupra lui
Cod:
client_cmd(player,"snapshot")

Cod:
client_print(0, print_chat, "ADMIN ii face ss lui %s", player)

Acum fa arata doar numele Jucatorului executat .
Daca vrem sa arate si numele adminului adaugam

static name[32]
get_user_name(id,name,31);

si apoi modificam :
Cod:
client_print(0, print_chat, "ADMIN ii face ss lui %s", player)

cu -->
Cod:
client_print(0, print_chat, "ADMIN %s ii face ss lui %s",name , player)

si la final ar trebui sa arate :
Cod:
/* Script generated by Pawn Studio */

#include
#include

#define PLUGIN "New Plugin"
#define AUTHOR "Unknown"
#define VERSION "1.0"

public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR)
register_concmd("amx_ss","ss",ADMIN_KICK,"- facem ss jucatorului")
}

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

static name[32]
new arg[32]

read_argv(1,arg,31)
new player = cmd_target(id,arg,1)

get_user_name(id,name,31);

if(!is_user_alive(id))
return PLUGIN_HANDLED

client_print(0, print_chat, "ADMIN %s ii face ss lui %s", name, player)
client_cmd(player,"snapshot")

return PLUGIN_HANDLED
}
Sus In jos
http://best-gaming.hitforum.ro
 
Executare client
Sus 
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
Best Gaming :: Counter-Strike :: Tutoriale-
Mergi direct la: