24.03.2013, 03:59
Hi, i have been trying for ages to get this aduty and setaname system working.
What i want it to do is if the player doesnt have a 'aName' set when trying to go on duty, he will be told that he needs to set one. So then he would do "/setaname name" and his aName would be set. (this also saves to the pInfo ini file.
OKay, so he types /aduty and he goes on admin duty, with the name he set.
This is when the problem happens, when he goes off duty, his name does not change back to his character name, it stays as his admin name.
Anyone know how to fix this please? I know it is something to do with the fact that 'pName' isn't saving to the ini file but i can't work it out.
Thanks alot for anyone that can help, im sure im just mispelling a word somewhere xD
Heres the necessary code(the asetname and aduty cmds are at line 1369)
http://pastebin.com/R7yt5yZH
What i want it to do is if the player doesnt have a 'aName' set when trying to go on duty, he will be told that he needs to set one. So then he would do "/setaname name" and his aName would be set. (this also saves to the pInfo ini file.
OKay, so he types /aduty and he goes on admin duty, with the name he set.
This is when the problem happens, when he goes off duty, his name does not change back to his character name, it stays as his admin name.
Anyone know how to fix this please? I know it is something to do with the fact that 'pName' isn't saving to the ini file but i can't work it out.
Thanks alot for anyone that can help, im sure im just mispelling a word somewhere xD
Heres the necessary code(the asetname and aduty cmds are at line 1369)
http://pastebin.com/R7yt5yZH