JeViCo Posted September 29, 2018 Posted September 29, 2018 Hello everyone. Does somebody know why? Wiki says that source of that event is a player but it doesn't work for some reason. Simple example (the second one works while the first one is not) addEventHandler("onPlayerSpawn",root,function() outputChatBox(tostring(getAccountID(getPlayerAccount(source)))) end) addCommandHandler("getID",function(p) outputChatBox(tostring(getAccountID(getPlayerAccount(p)))) end)
iMr.WiFi..! Posted September 29, 2018 Posted September 29, 2018 9 minutes ago, JeViCo said: Hello everyone. Does somebody know why? Wiki says that source of that event is a player but it doesn't work for some reason. Simple example (the second one works while the first one is not) addEventHandler("onPlayerSpawn",root,function() outputChatBox(tostring(getAccountID(getPlayerAccount(source)))) end) addCommandHandler("getID",function(p) outputChatBox(tostring(getAccountID(getPlayerAccount(p)))) end) You need to check if he has an account. Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
JeViCo Posted September 30, 2018 Author Posted September 30, 2018 12 hours ago, iMr.WiFi..! said: You need to check if he has an account. account existed i replaced it with onPlayerLogin event and solved my problem. Thanks anyway
LilDawage Posted October 10, 2018 Posted October 10, 2018 addEventHandler("onPlayerSpawn",root,function() outputChatBox(tostring(getAccountID(getPlayerAccount(source)))) end) this bro Try to make source identified addEventHandler("onPlayerSpawn",root,function(p) RPG/CnR servers Developer , You want help ? contact me on discord >>>lilDawage#8508<<< i'm at your Service 10/24 hours 7/7 days , >>>Welcome<<< Asking Discord Channel JOIN US ON here , you are welcome 10/24 active
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now