Raised This Month: $ Target: $400
 0% 

Help with cvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
padilha007
Senior Member
Join Date: Jul 2008
Old 07-25-2008 , 22:10   Help with cvar
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
 
new origin[32][3]
 
public 
plugin_init() {
register_plugin("Show Pos|Modif. |Yokil SpyWare","1.0","Alka");
register_clcmd("say /ponto","ok1")
register_clcmd("IRKK","ok2")
//set_task(0.1,"posicao",0,"",0,"b");
register_clcmd("amx_salvar","salvar");
register_cvar("amx_ir","0 0 0");
register_cvar("amx_ok","0");
}
 
public 
ok2(id) {
new 
ok get_cvar_num("amx_ir")
new 
name[18]
get_user_name(idname17
client_cmd(id,"amx_teleport %s %s"nameok)
}


public 
ok1(idlevelcid) {
if (!(
get_user_flags(id)&ADMIN_SLAY))
{
client_print(id,print_chat,"[AMX] Voce nao tem acesso a este comando!")
return 
PLUGIN_HANDLED
}
set_task(0.1,"posicao",50989,"",0,"b");
return 
PLUGIN_HANDLED;
}

public 
posicao() {

if(
get_cvar_num("amx_ok") != 1)
{
 for(new 
i=1;i<32;i++)
 { 
  if(!
is_user_alive(i))
   return 
PLUGIN_CONTINUE;
 
  
get_user_origin(i,origin[i])
 
  
set_hudmessage(255,255,2000.020.8706.03.0);
  
show_hudmessage(i,"%i %i %i",origin[i][0],origin[i][1],origin[i][2])
 }
 return 
PLUGIN_HANDLED;
}
else{
remove_task(50989)
return 
PLUGIN_HANDLED;
}
return 
PLUGIN_HANDLED;
}

public 
salvar(id) {
client_print(idprint_chat"Digite no console 3 comandos:");
client_print(idprint_chat"amx_rcon amx_ok '1'");
client_print(idprint_chat"amx_rcon amx_tele '1'");
client_print(idprint_chat"amx_rcon amx_ir '(Primeiro Numero) (Espaço) (Segundo Numero) (Espaço) (Terceiro Numero)' ");
return 
PLUGIN_HANDLED;

i need:

to put in console amx_teleport amx_ir and go to amx_ir value, i set amx_ir number to "100 100 100". Possible?

Last edited by padilha007; 07-25-2008 at 23:44.
padilha007 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode