(08-03-2017, 04:06 AM)PlayEasymx escribió:(08-01-2017, 11:05 PM)Sky^^ escribió:No sirve xdCódigo PHP:#include <amxmodx>
#include <amxmisc>
public plugin_init( )
register_clcmd( "say", "hook_Clcmd" );
public hook_Clcmd( id )
{
if(!is_user_connected( id ) ) return PLUGIN_HANDLED;
new szMessage[ 32 ];
read_args( szMessage, charsmax( szMessage ) );
remove_quotes( szMessage );
if( equal( szMessage, "/drugs", 5 ) && is_user_admin( id ) )
{
new szPlayer = cmd_target( id, szMessage[ 6 ], 0 );
if( !szPlayer ) return PLUGIN_CONTINUE;
setEffectDrug( szPlayer );
}
return PLUGIN_HANDLED_MAIN;
}
public setEffectDrug( id )
{
new gmsg_SetFOV = get_user_msgid("SetFOV")
message_begin( MSG_ONE, gmsg_SetFOV, { 0, 150, 0 }, id );
write_byte( 180 );
message_end( );
}
Prueba xdxd
Así debería funcionarte:
Código PHP:
#include <amxmodx>
#include <amxmisc>
public plugin_init( )
register_clcmd( "say", "hook_Clcmd" );
public hook_Clcmd( id )
{
if(!is_user_connected( id ) ) return PLUGIN_HANDLED;
new szMessage[ 32 ];
read_args( szMessage, charsmax( szMessage ) );
remove_quotes( szMessage );
if( equal( szMessage, "/drugs", 5 ) && is_user_admin( id ) )
{
new szPlayer = cmd_target( id, szMessage[ 6 ], 0 );
if( !szPlayer ) return PLUGIN_CONTINUE;
setEffectDrug( id, szPlayer );
}
return PLUGIN_HANDLED_MAIN;
}
public setEffectDrug( id, target )
{
new player;
if( target ) player = target;
else
{
new arg[ 32 ];
read_argv( 1, arg, 31 );
player = cmd_target( id, arg, CMDTARGET_ALLOW_SELF );
}
if( !player || !is_user_connected( player ) ) return PLUGIN_HANDLED;
new gmsg_SetFOV = get_user_msgid("SetFOV")
message_begin( MSG_ONE, gmsg_SetFOV, { 0, 150, 0 }, player );
write_byte( 180 );
message_end( );
return PLUGIN_HANDLED;
}
(08-03-2017, 04:06 AM)PlayEasymx escribió:(08-01-2017, 11:05 PM)Sky^^ escribió:No sirve xdCódigo PHP:#include <amxmodx>
#include <amxmisc>
public plugin_init( )
register_clcmd( "say", "hook_Clcmd" );
public hook_Clcmd( id )
{
if(!is_user_connected( id ) ) return PLUGIN_HANDLED;
new szMessage[ 32 ];
read_args( szMessage, charsmax( szMessage ) );
remove_quotes( szMessage );
if( equal( szMessage, "/drugs", 5 ) && is_user_admin( id ) )
{
new szPlayer = cmd_target( id, szMessage[ 6 ], 0 );
if( !szPlayer ) return PLUGIN_CONTINUE;
setEffectDrug( szPlayer );
}
return PLUGIN_HANDLED_MAIN;
}
public setEffectDrug( id )
{
new gmsg_SetFOV = get_user_msgid("SetFOV")
message_begin( MSG_ONE, gmsg_SetFOV, { 0, 150, 0 }, id );
write_byte( 180 );
message_end( );
}
Prueba xdxd
Así debería funcionarte
Código PHP:
#include <amxmodx>
#include <amxmisc>
public plugin_init( )
register_clcmd( "say", "hook_Clcmd" );
public hook_Clcmd( id )
{
if(!is_user_connected( id ) ) return PLUGIN_HANDLED;
new szMessage[ 32 ];
read_args( szMessage, charsmax( szMessage ) );
remove_quotes( szMessage );
if( equal( szMessage, "/drugs", 5 ) && is_user_admin( id ) )
{
new szPlayer = cmd_target( id, szMessage[ 6 ], 0 );
if( !szPlayer ) return PLUGIN_CONTINUE;
setEffectDrug( id, szPlayer );
}
return PLUGIN_HANDLED_MAIN;
}
public setEffectDrug( id, target )
{
new player;
if( target ) player = target;
else
{
new arg[ 32 ];
read_argv( 1, arg, 31 );
player = cmd_target( id, arg, CMDTARGET_ALLOW_SELF );
}
if( !player || !is_user_connected( player ) ) return PLUGIN_HANDLED;
new gmsg_SetFOV = get_user_msgid("SetFOV")
message_begin( MSG_ONE, gmsg_SetFOV, { 0, 150, 0 }, player );
write_byte( 180 );
message_end( );
return PLUGIN_HANDLED;
}
(08-03-2017, 04:36 PM)Fury escribió: @Sky^^ pasame tu steam
steamcommunity.com/id/__Sky