Tutoriale scripting, cod si portiuni de cod.
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
-
Nimicitu`
- Membru, skill +1
- Posts: 162
- Joined: 01 Sep 2015, 13:42
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Fond eXtream: 0
-
Contact:
12 Oct 2015, 21:36
Doresc un cod care sa dea la x secunde un he, acces T ( pentru VIP )
am un cod dar nu e bun
- cod | Afiseaza codul
public Func_GiveHe( id )
{
if( !( get_user_flags( id ) & ACCESS ) )
{
if ( !is_user_alive( id ) || cs_get_user_bpammo( id , CSW_HEGRENADE ) > 0 )
return;
if ( g_contor[ id ] > 0 )
{
set_hudmessage( 0, 255, 0, 0.02, 0.48, 0, 1.0, 1.0 );
show_hudmessage( id, "Vei primi un HE gratis in %i secunde...", g_contor[ id ] );
g_contor[ id ]--;
return;
}
else
{
set_hudmessage( 0, 255, 0, 0.02, 0.48, 0, 1.0, 1.0 );
show_hudmessage( id, "Ai primit un HE gratis!" );
g_contor[ id ] = get_pcvar_num( g_Delay );
give_item( id, "weapon_hegrenade" );
}
}
}
-
Challenger.
- Fost moderator
- Posts: 2530
- Joined: 07 Dec 2014, 14:32
- Detinator Steam: Da
- Reputatie: Fost Super Moderator
Nume anterior: whisTle
Puncte: 1.7 / 3
- Fond eXtream: 0
-
Contact:
13 Oct 2015, 20:27
- | Afiseaza codul
#include < amxmodx >
#include < cstrike >
#include < fun >
new g_Delay, g_contor[ 33 ];
public plugin_init( )
{
register_plugin "Give Free HE Grenade", "1.1", "KronoS # GG" ;
g_Delay = register_cvar( "freehe_delay", "10" );
}
public client_putinserver( index )
{
g_contor[ index ] = 0;
set_task 1.0, "Func_GiveHe", index, _, _, "b" ;
}
public Func_GiveHe( index )
{
if ( get_user_flags ( index ) & ADMIN_LEVEL_H )
{
if ( !is_user_alive( index ) || cs_get_user_bpammo( index , CSW_HEGRENADE ) > 0 )
return;
if ( g_contor[ index ] > 0 )
{
set_hudmessage 0, 255, 0, 0.02, 0.48, 0, 1.0, 1.0 ;
show_hudmessage index, "Vei primi un HE gratis in %i secunde...", g_contor[ index ] ;
g_contor[ index ]--;
return;
}
else
{
set_hudmessage 0, 255, 0, 0.02, 0.48, 0, 1.0, 1.0 ;
show_hudmessage index, "Ai primit un HE gratis!" ;
g_contor[ index ] = get_pcvar_num( g_Delay );
give_item index, "weapon_hegrenade" ;
}
}
}
public client_disconnect(id) remove_task(id)
-
Nimicitu`
- Membru, skill +1
- Posts: 162
- Joined: 01 Sep 2015, 13:42
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Fond eXtream: 0
-
Contact:
-
Users browsing this forum: No registered users and 5 guests