( old read file native i know ... : P )
If you want to read from file ( addons/myidontknowwhat.txt ) example 2 things: mapname value
PHP Code:
// how many costom things to you want to be in param 2
#define d_costom 3
// param 2 from file
new const d_param2[d_costom][] = { "vipmenu", "awp", "and so on..." }
// Variable for readed param 2
// this goes that way
// if map is example de_dust and param 2 is awp then this variable hold 1
// vipmenu will hold 0
// awp will hold 1
// and so on... hold 2, if you add more this way the number will go, i hope you understand
new d_param2
// lets read a file
public plugin_init()
{
new a, b[32], line[128], c[64], d[64], e
get_mapname(b,29)
for(a = 0; a != -1; a++) {
b[31] = read_file( "addons/myidontknowwhat.txt", a, line, 126, b[30])
if(!b[31]) break
if( !line[0] || line[0] == ' ' || line[0] == '/' ) continue
parse(line, c, d ); trim(c); trim(d)
if(equal(c,b)) {
for(e = 0; e < d_costom; e++) {
if(equal(d,d_param2[e])) { d_param2 = e; break }; }
}}}
// now what do you need to do is only check variable d_param2
// example
if ( d_param2 == 1 )
{
// param2 from file was awp
}