Having a little trouble getting this to work
PHP Code:
public Action:SayHook(client, args)
{
if(GetConVarInt(helpEnabled) == 1)
{
new String:speech[128];
GetCmdArgString(speech, sizeof(speech));
new startidx = 0;
if (speech[0] == '"')
{
startidx = 1;
new len = strlen(speech);
if (speech[len-1] == '"')
{
speech[len-1] = '\0';
}
}
if(strcmp(speech[startidx],"list sounds",false) == 0 ||
strcmp(speech[startidx],"soundlist",false) == 0)
{
PrintToChat(client, "Say !soundlist in chat for sounds list");
return Plugin_Handled;
}else if{
strcmp(speech[startidx],"servers",false) == 0)
{
PrintToChat(client, "Say !servers in chat for server menu");
return Plugin_Handled;
}
return Plugin_Continue;
}
}
Basically it works fine untill I add the second trigger text ("servers") and then it won't compile. Would like to get this working as it helps players find features on the server, which may not use the triggers they are used to elsewhere.
Any ideas?