c0nnex / GTMPGameMode

GT-MP Basic high performance GameMode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enum support for GameModeScript.GetArg

g0dsCookie opened this issue · comments

Convert.ChangeType doesn't work for Enum types.

if (typeof(T).IsEnum)
    return (T)Enum.Parse(typeof(T), args[index].ToString());

^ This within the try/catch blocks should do the trick.