Участник
Пользователь
- Сообщения
- 147
- Реакции
- 29
Hi guys, im trying to match a letter from player's name with string (one letter) from array[enum]:
PS:maybe this gives any information but im not sure: https://forums.alliedmods.net/showpost.php?p=209036&postcount=3
Thank in advance!
Код:
enum _:EnumInfo
{
FirstOne[ 10 ],
SecondOne[ 32 ]
}
new const g_szSearchIt[][ EnumInfo ] =
{
{ "j", "1" },
{ "o", "2" },
}
.........
for( new i; i < 2; i++ )
{
for( new j; j < 3; j++ )
{
if( equali( name[ j ], g_szSearchIt[ i ][ FirstOne ] ) ) //if my nick is joca, it shoud be "j" = "j", right?
client_print( id, 3, "found" )
}
}
Thank in advance!