Help with !vip command thingy!

Ok so when people type !vip in my server it takes them to my donation page… Well i did work until i added a new scoreboard that i brought from scriptfodder, Does anyone know why it would stop working?

function donateOpen( pl, text, teamonly )
if (text == “!donate” or text == “!Donate” or text == “!VIP” or text == “!vip” or text == “!Vip”) then
pl:SendLua([[gui.OpenURL(“http://clickserver.nn.pe/donate”)]])
end
end
hook.Add( “PlayerSay”, “Chat”, donateOpen )

Thanks

it’s possible that either they are returning a value in the PlayerSay hook, which there is nothing you can do about it (unless you contact the creator or change it yourself). Or they use the “Chat” index, which means you only have to change it. These are the likely scenarios, but not the only ones.

@below, please test your code giving it to some to use. It doesn’t work.


 function donateOpen( pl, text, teamonly )
    text = string.lower( text )
    if ( string.sub ( text, 1 ) == "!donate" or == "!vip" )then 
    pl:SendLua([[gui.OpenURL("http://clickserver.nn.pe/donate")]])
end

end
hook.Add( "PlayerSay", "Chat", donateOpen ) 

[editline]13th February 2015[/editline]

if they type !DONATE it will still open if they type !VIP it will still open if they type !Vjp it wont open if they type !vIP it will open

Could anyone help me change it to make it work please?

The code you posted works, If you read my first response then you will see your problem.

Yes i know what the problem is but what im asking is if anyone can do that for me as i don’t know how to!

We cannot fix something that is not ours. You have to contact the creator of the addon.

You have the code for the addon, just change it. It ain’t hard.

What the issue is is the hook identifier. It MUST be unique, otherwise you can fuck up everything.


 function donateOpen( pl, text, teamonly )
    text = string.lower( text )
    if ( string.sub ( text, 1 ) == "!donate" or == "!vip" )then 
    pl:SendLua([[gui.OpenURL("http://clickserver.nn.pe/donate")]])
end

end
hook.Add( "PlayerSay", "GO_EAT_A_HAM_SANDWICH", donateOpen ) 

I can not get hold of the creator as he has been inactive for over a month! I am no good with all this scripting stuff…

[editline]14th February 2015[/editline]

It is when i haven’t a clue what i should change on it :confused: