abu5lf Posted April 2, 2012 Posted April 2, 2012 (edited) function onLogin (_,account) local police = getAccountData(account, "polic") if police then setPlayerTeam ( source, police ) setElementModel (source, 230) end end addEventHandler ("onPlayerLogin", root, onLogin) function saveData(thePlayer, theAccount) if (getPlayerTeam(thePlayer) == getTeamFromName("Police")) and (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "police", getTeamFromName("Police") ) end end addEventHandler ("onPlayerQuit", root, saveData) addEventHandler ("onPlayerLogout", root, saveData) Edited April 2, 2012 by Guest ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
Castillo Posted April 2, 2012 Posted April 2, 2012 What the hell is this? you post a script and you don't tell us why? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
abu5lf Posted April 2, 2012 Author Posted April 2, 2012 What the hell is this? you post a script and you don't tell us why? thanks you problem solved ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
Castillo Posted April 2, 2012 Posted April 2, 2012 Ok, I'll lock this topic so nobody make's a useless reply. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts