no look
treat the
Code:
if (get_cvar_num("pa_lol")==1)
as it was a function
in a function its:
Code:
public name(args)
{ // Begin
... //everything inside the function
} //End
you also need begin and end to the if thing...
and also need to return PLUGIN_HANDLED outside the "if". so ur function should look like that
Code:
public saylol(id)
{
if (get_cvar_num("pa_lol")==1)//to display message
{
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "I said lol ")
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
NOTE:
IF has the same structure of a FUNCTION