Jump to content

VERIFICAÇÃO


Recommended Posts

Olá pessoal, fiz um script simples para alterar skins, gostaria de saber como posso fazer uma verificação nesta função para que se o jogador já estiver clicado e a skin ter alterado e ele clicar de novo no mesmo botão enviar uma output avisando que ele já esta com tal skin !

Código:

function skinv1 ()
	setPedSkin ( source, 73 )
	outputChatBox( "Teste skin1", source, 243, 219, 4, true )
end
addEvent("Skin1",true)
addEventHandler ( "Skin1", getRootElement(), skinv1 )

 

Link to comment
function skinv1 ()
	if getElementModel(source)==73 then
		return outputChatBox( "voce já esta com essa skin", source, 243, 219, 4, true )
	end	
	setPedSkin ( source, 73 )
	outputChatBox( "Teste skin1", source, 243, 219, 4, true )
end
addEvent("Skin1",true)
addEventHandler ( "Skin1", getRootElement(), skinv1 )

 

  • Thanks 1
Link to comment
51 minutes ago, Gw8 said:

function skinv1 ()
	if getElementModel(source)==73 then
		return outputChatBox( "voce já esta com essa skin", source, 243, 219, 4, true )
	end	
	setPedSkin ( source, 73 )
	outputChatBox( "Teste skin1", source, 243, 219, 4, true )
end
addEvent("Skin1",true)
addEventHandler ( "Skin1", getRootElement(), skinv1 )

 

Vlw estava precisando desta função ;D

Edited by OverKILL
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...