Skilled Illusionist
- Joined
- Dec 26, 2010
- Messages
- 390
- Reaction score
- 157
Alright, since I remember one of my coders during caali times made this to protect anyone from gaining GM powers in game through SQL injections or something, I will now remake into MsSQL.
Caution: I'm making this RIGHT NOW. So I haven't tested it yet. Don't be pissed if I ruin your whole damn character tbl - Not my fault <3
1. Put this script into your config file.
Now, where the line says
Put the GM's Name in the "".
What this does is if a character is GM, BUT ISN'T in the array on the script, it'll set isblock to equal D, which makes the GM inuseable.
kthx
-Apixen
Caution: I'm making this RIGHT NOW. So I haven't tested it yet. Don't be pissed if I ruin your whole damn character tbl - Not my fault <3
1. Put this script into your config file.
PHP:
$getallgms = mssql_query("SELECT * FROM [CHARACTER_01_DBF].dbo.[CHARACTER_TBL] WHERE m_chAuthority != 'F' AND isblock != 'D'");
$gm_ids = array("m_szName", "m_szName", "m_szName", "m_szName");
while($fetch = mssql_fetch_array($getallgms))
{
if(!in_array($fetch['m_szName'], $gm_ids))
{
$update = mssql_query("UPDATE [CHARACTER_01_DBF].dbo.[CHARACTER_TBL] SET isblock='D' where m_szName='{$fetch['m_szName']}'");
}
Now, where the line says
Code:
$gm_ids = array("m_szName", "m_szName", "m_szName", "m_szName");
What this does is if a character is GM, BUT ISN'T in the array on the script, it'll set isblock to equal D, which makes the GM inuseable.
kthx
-Apixen
Last edited: