magicplayerc Posted December 24, 2018 Share Posted December 24, 2018 (edited) function PMtrabalhar ( ThePlayer ) local accName = getAccountName ( getPlayerAccount ( ThePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "PMP") ) then if not isElementWithinMarker(ThePlayer, MarkerPM) then return end if getElementData(ThePlayer, "PMemprego", true) then outputChatBox("#ff0000Voçe ja esta em serviço e nao pode bater cartao novamente",ThePlayer,255,255,255,true) else outputChatBox(" "..getPlayerName(ThePlayer).." #FFFF00BATEU O CARTAO E ESTA EM SERVIÇO PARA PATRULHAMENTO E RECEBER CHAMADAS 190", Player, 255, 255, 255, true) setElementData(ThePlayer, "PMemprego", true) end end end addCommandHandler("batercartao", PMtrabalhar) ONDE COLOCO ARMA SKIN COLETE AQUI pra quando digitar comando pegar tudo Edited December 25, 2018 by jhxp Link to comment
MTA Team jhxp Posted December 25, 2018 MTA Team Share Posted December 25, 2018 Please use code tag <> and mark your code as Lua next time. Also make sure to post in the correct section. Link to comment
Other Languages Moderators Lord Henry Posted December 25, 2018 Other Languages Moderators Share Posted December 25, 2018 Use a função giveWeapon a partir da linha 8. Link to comment
DNL291 Posted December 25, 2018 Share Posted December 25, 2018 On 23/12/2018 at 22:58, magicplayerc said: ARMA SKIN COLETE São estas funções: setPedArmor( ThePlayer, 100 ) setElementModel( ThePlayer, skinID ) giveWeapon( ThePlayer, weaponID, true ) Coloque depois de "else" na linha 7. Deixe seu código mais legível e organizado, indente o seu código. 1 Link to comment
magicplayerc Posted December 25, 2018 Author Share Posted December 25, 2018 obrigado ja me ajudaram Link to comment
Other Languages Moderators Lord Henry Posted December 26, 2018 Other Languages Moderators Share Posted December 26, 2018 Ah, perdão. Não tinha visto que ele queria outras coisas além de armas. Por isso que se deve colocar os detalhes do post antes do código. Link to comment
Jonas^ Posted December 26, 2018 Share Posted December 26, 2018 (edited) Nessa linha no seu código: outputChatBox(" "..getPlayerName(ThePlayer).." #FFFF00BATEU O CARTAO E ESTA EM SERVIÇO PARA PATRULHAMENTO E RECEBER CHAMADAS 190", Player, 255, 255, 255, true) Você esta declarando player, se você quer que mostre para todos deveria ser assim: outputChatBox("O(a) Policial "..getPlayerName(ThePlayer).." #FFFF00BATEU O CARTAO E ESTA EM SERVIÇO PARA PATRULHAMENTO E RECEBER CHAMADAS 190", root, 255, 255, 255, true) Edited December 26, 2018 by OverKILL 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