(06-30-2017, 04:08 AM)ChrstopH escribió: es un plugin que un cabrón me pidió por steam para un DR pero se puede usar para cualquiera v:
/revive nick y los otros comandos..
para configurar la grav y speed tienen que tocar el code SI O SI.
No lo probe pero seguro sirve v:Código PHP:/* Script generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#include hamsandwich
#include <cstrike>
#include fun
#define PLUGIN "New Plugin"
#define AUTHOR "autor"
#define VERSION "1.0"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your own code here
register_clcmd("say", "clcmd_say");
}
public clcmd_say( index ){
if (!is_user_connected( index )) return PLUGIN_HANDLED;
new szMessage[32];
read_args(szMessage, charsmax(szMessage));
remove_quotes(szMessage);
if (equal(szMessage, "/swap",5) && is_user_admin( index ))
{
new player = cmd_target( index , szMessage[6], 0);
if (!player) return PLUGIN_CONTINUE;
cmd_Cmd(index, player, 3);
}
else if (equal(szMessage, "/revive",7) && is_user_admin( index ))
{
new player = cmd_target( index , szMessage[8], 0)
if (!player) return PLUGIN_CONTINUE
cmd_Cmd( index , player, 2);
}
else if (equal(szMessage, "/speed",6) && is_user_admin( index ))
{
new player = cmd_target( index , szMessage[7], 0)
if (!player) return PLUGIN_CONTINUE
cmd_Cmd( index , player, 0);
}
else if (equal(szMessage, "/grav",5) && is_user_admin( index ))
{
new player = cmd_target( index , szMessage[6], 0)
if (!player) return PLUGIN_CONTINUE
cmd_Cmd( index , player, 1);
}
return PLUGIN_HANDLED_MAIN;
}
public cmd_Cmd(id, target, tipo)
{
if (is_user_admin( id ))
{
new player, iName[32][2];
if (target) player = target
else
{
new arg[32]
read_argv(1, arg, 31)
player = cmd_target(id, arg, CMDTARGET_ALLOW_SELF)
}
get_user_name(id, iName[0], 31);
get_user_name(player, iName[1], 31);
if (!player || !is_user_connected(player)) return PLUGIN_HANDLED;
switch(tipo){
case 0: set_user_maxspeed( player, 300.0 );
case 1: set_user_gravity( player, 0.3 );
case 2: ExecuteHamB(Ham_CS_RoundRespawn, player);
case 3: cs_set_user_team(player,( cs_get_user_team(player) == CS_TEAM_T ? CS_TEAM_CT : CS_TEAM_T));
}
set_hudmessage(0, 255, 0, -1.0, -1.0)
show_hudmessage(id, "El admin %s te %s! ",
iName[id][0], tipo == 0 ? "Dio Speed" : tipo == 1 ? "Dio Gravedad" : tipo == 2 ? "revivio" :"cambio de team");
client_print(id, print_chat, "El admin %s %s a %s", iName[id][0], tipo == 0 ? "Dio Speed" : tipo == 1 ? "Dio Gravedad" : tipo == 2 ? "revivio" :"cambio de team", iName[player][1])
}
return PLUGIN_HANDLED;
}
+Rep papi gracias por el plugin :3333
(06-30-2017, 04:23 AM)Fury escribió: Te lo pidió en AM
no se lo pedi a el en si, si no al que me ayudara xD. Pero le hable por mp en steam c:
(06-30-2017, 04:08 AM)ChrstopH escribió: es un plugin que un cabrón me pidió por steam para un DR pero se puede usar para cualquiera v:oye we 1er bug xD cuando das /swap solamente te cambia a T pero no te manda a la base (en mi caso deathrun)
/revive nick y los otros comandos..
para configurar la grav y speed tienen que tocar el code SI O SI.
No lo probe pero seguro sirve v:Código PHP:/* Script generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#include hamsandwich
#include <cstrike>
#include fun
#define PLUGIN "New Plugin"
#define AUTHOR "autor"
#define VERSION "1.0"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your own code here
register_clcmd("say", "clcmd_say");
}
public clcmd_say( index ){
if (!is_user_connected( index )) return PLUGIN_HANDLED;
new szMessage[32];
read_args(szMessage, charsmax(szMessage));
remove_quotes(szMessage);
if (equal(szMessage, "/swap",5) && is_user_admin( index ))
{
new player = cmd_target( index , szMessage[6], 0);
if (!player) return PLUGIN_CONTINUE;
cmd_Cmd(index, player, 3);
}
else if (equal(szMessage, "/revive",7) && is_user_admin( index ))
{
new player = cmd_target( index , szMessage[8], 0)
if (!player) return PLUGIN_CONTINUE
cmd_Cmd( index , player, 2);
}
else if (equal(szMessage, "/speed",6) && is_user_admin( index ))
{
new player = cmd_target( index , szMessage[7], 0)
if (!player) return PLUGIN_CONTINUE
cmd_Cmd( index , player, 0);
}
else if (equal(szMessage, "/grav",5) && is_user_admin( index ))
{
new player = cmd_target( index , szMessage[6], 0)
if (!player) return PLUGIN_CONTINUE
cmd_Cmd( index , player, 1);
}
return PLUGIN_HANDLED_MAIN;
}
public cmd_Cmd(id, target, tipo)
{
if (is_user_admin( id ))
{
new player, iName[32][2];
if (target) player = target
else
{
new arg[32]
read_argv(1, arg, 31)
player = cmd_target(id, arg, CMDTARGET_ALLOW_SELF)
}
get_user_name(id, iName[0], 31);
get_user_name(player, iName[1], 31);
if (!player || !is_user_connected(player)) return PLUGIN_HANDLED;
switch(tipo){
case 0: set_user_maxspeed( player, 300.0 );
case 1: set_user_gravity( player, 0.3 );
case 2: ExecuteHamB(Ham_CS_RoundRespawn, player);
case 3: cs_set_user_team(player,( cs_get_user_team(player) == CS_TEAM_T ? CS_TEAM_CT : CS_TEAM_T));
}
set_hudmessage(0, 255, 0, -1.0, -1.0)
show_hudmessage(id, "El admin %s te %s! ",
iName[id][0], tipo == 0 ? "Dio Speed" : tipo == 1 ? "Dio Gravedad" : tipo == 2 ? "revivio" :"cambio de team");
client_print(id, print_chat, "El admin %s %s a %s", iName[id][0], tipo == 0 ? "Dio Speed" : tipo == 1 ? "Dio Gravedad" : tipo == 2 ? "revivio" :"cambio de team", iName[player][1])
}
return PLUGIN_HANDLED;
}