Zamien to:
new name[31]; get_user_name(id,name,32);
Na to:
new name[33]; get_user_name(id, name, 32);
To równanie zostało stworzone przy pomocy kodu LaTeX:
Edytor LaTeX online: CodeCogs.com/latex/eqneditor.php
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|




Nie podano
Napisane przez Rivit
w 30.03.2014 11:30
Napisane przez Rivit
w 30.03.2014 09:06
Napisane przez SeeK
w 04.03.2013 19:33
xredirect.sma 110,08 KB 513 Ilość pobrań
xredirect.amxx
xredirect-beta.sma 154,35 KB 284 Ilość pobrań
xredirect-beta.amxx
Napisane przez DarkGL
w 09.06.2013 02:38
#define foreach(%1,%2) for( new iCurrentElement = 0 , %2 = %1[ 0 ]; iCurrentElement < sizeof %1 ; iCurrentElement++ , %2 = iCurrentElement < sizeof %1 ? %1[ iCurrentElement ] : 0 ) #define forrange4(%1,%2,%3,%4) for( new %1 = %2; %1 < %3 ; %1 += %4 ) #define forrange3(%1,%2,%3) for( new %1 = %2; %1 < %3 ; %1 += 1 ) #define forrange2(%1,%2) for( new %1 = 0; %1 < %2 ; %1 += 1 )
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plugin"
#define AUTHOR "DarkGL"
#define VERSION "1.0"
#define foreach(%1,%2) for( new iCurrentElement = 0 , %2 = %1[ 0 ]; iCurrentElement < sizeof %1 ; iCurrentElement++ , %2 = iCurrentElement < sizeof %1 ? %1[ iCurrentElement ] : 0 )
#define forrange4(%1,%2,%3,%4) for( new %1 = %2; %1 < %3 ; %1 += %4 )
#define forrange3(%1,%2,%3) for( new %1 = %2; %1 < %3 ; %1 += 1 )
#define forrange2(%1,%2) for( new %1 = 0; %1 < %2 ; %1 += 1 )
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
new testArray[] = { 1 , 2 , 3 , 4 };
foreach( testArray , value ){
log_amx( "each %d" , value );
}
log_amx( "Range 1" );
forrange2( value , 5 ){
log_amx( "range1 %d" , value );
}
log_amx( "Range 2" );
forrange3( value , 1 , 5 ){
log_amx( "range2 %d" , value );
}
log_amx( "Range 3" );
forrange4( value , 0 , 100 , 10 ){
log_amx( "range3 %d" , value );
}
}
[testFor.amxx] each 1 [testFor.amxx] each 2 [testFor.amxx] each 3 [testFor.amxx] each 4 [testFor.amxx] Range 1 [testFor.amxx] range1 0 [testFor.amxx] range1 1 [testFor.amxx] range1 2 [testFor.amxx] range1 3 [testFor.amxx] range1 4 [testFor.amxx] Range 2 [testFor.amxx] range2 1 [testFor.amxx] range2 2 [testFor.amxx] range2 3 [testFor.amxx] range2 4 [testFor.amxx] Range 3 [testFor.amxx] range3 0 [testFor.amxx] range3 10 [testFor.amxx] range3 20 [testFor.amxx] range3 30 [testFor.amxx] range3 40 [testFor.amxx] range3 50 [testFor.amxx] range3 60 [testFor.amxx] range3 70 [testFor.amxx] range3 80 [testFor.amxx] range3 90
jak widać najlepiej zastosowac tu funkcje forrange3po elementach tablicy czy wszystkich graczach
forrange( currentPlayerID , 1 , 33 )( zamiast stałej 33 można też wstawić pobieranie ilości slotów )



Moja zawartość