Annas Posted April 11, 2015 Share Posted April 11, 2015 Help me pls . i think my dream is hard .. , but i'll tell you what i want .. Function Replace() local Account Name = getPlayerAccount (USERNAME) if (Account Name) then txd = engineLoadTXD ( "infernus.txd" ) engineImportTXD ( txd, 411) end addCommandHandler("vehskin" , Replace) i wish you understand me i wanna only a username can do this command (vehskin) and if he do the TXD vehicle of Infernus will changed (only for me) (i dont wanna it for Acl Group) if you help me (and thx) i wanna the SERVER side (if it have) and the CLIENT side (if it have) , and the meta and thx <3 Link to comment
#RooTs Posted April 11, 2015 Share Posted April 11, 2015 is client side engineImportTXD is serverSide getPlayerAccount Maybe, Maybe, do it any other way try use the function to serverSide, and import to ClientSite if (isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(playersource)), aclGetGroup("Admin"))) then Link to comment
Annas Posted April 11, 2015 Author Share Posted April 11, 2015 you didn't understand , i wanna complete SCRIPT pls .. and as what i say Function Replace() local Account Name = getPlayerAccount (USERNAME) if (Account Name) then txd = engineLoadTXD ( "infernus.txd" ) engineImportTXD ( txd, 411) end addCommandHandler("vehskin" , Replace) Link to comment
Walid Posted April 12, 2015 Share Posted April 12, 2015 You can't write it like this because getPlayerAccount() it's a server side function so all what you need is : triggerClientEvent() example : -- Server side function replace (player) if not isElement(player) then return end local account = getPlayerAccount (player) if not isGuestAccount ( account ) then local accName = getAccountName(account) if accName == " YOUR ACCOUNT NAME " then triggerClientEvent(player,"Replace",player) else outputChatBox ("sorry you can use this command!",player,255,0,0) end end addCommandHandler("vehskin" ,replace) -- Client side function replace () txd = engineLoadTXD ( "infernus.txd" ) engineImportTXD ( txd, 411) end addEvent("Replace",true) addEventHandler("Replace",root,replace) Link to comment
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