gymMarker = createMarker( -2262.444, -163.06, 35.17, 'cylinder', 2, 255, 0, 0, 150 )
function buyitCommand ( thePlayer, command, number )
if (number == 1) then
setPedFightingStyle (thePlayer, 4)
outputChatBox ("Has Comprado el Estilo -Estandar- de Pelea por 50$", thePlayer, 140, 0, 140)
takePlayerMoney ( thePlayer, 50 )
elseif (number == 2) then
setPedFightingStyle (thePlayer, 16)
outputChatBox ("Has Comprado el Estilo -Con Los Codos- por 250$", thePlayer, 140, 0, 140)
takePlayerMoney ( thePlayer, 250 )
elseif (number == 3) then
setPedFightingStyle (thePlayer, 15)
outputChatBox ("Has comprado el Estilo -Agarrar y Patear- por 500$", thePlayer, 140, 0, 140)
takePlayerMoney ( thePlayer, 500 )
elseif (number == 4) then
setPedFightingStyle (thePlayer, 5)
outputChatBox ("Has Comprado el Estilo -Boxeador- por 1000$", thePlayer, 140, 0, 140)
takePlayerMoney ( thePlayer, 1000 )
elseif (number == 5) then
setPedFightingStyle (thePlayer, 6)
outputChatBox ("Has Comprado el Estilo de -Kung-Fu- por 2500$", thePlayer, 140, 0, 140)
takePlayerMoney ( thePlayer, 2500 )
elseif (number == 6) then
setPedFightingStyle (thePlayer, 7)
outputChatBox ("Has Comprado el Estilo -Rodilla en la Cabeza- por 5000$", thePlayer, 140, 0, 140)
takePlayerMoney ( thePlayer, 5000 )
end
end
function FightstyleShop( hitElement, matchingDimension )
outputChatBox ("Compra tu Estilo de Pelea.", hitElement, 140, 0, 140)
outputChatBox ("1 - 50$ - Estandar", hitElement, 140, 0, 140)
outputChatBox ("2 - 250$ - Con Los Codos", hitElement, 140, 0, 140)
outputChatBox ("3 - 500$ - Agarrar y Patear", hitElement, 140, 0, 140)
outputChatBox ("4 - 1000$ - Estilo Boxeador", hitElement, 140, 0, 140)
outputChatBox ("5 - 2500$ - Estilo Kung-Fu", hitElement, 140, 0, 140)
outputChatBox ("6 - 5000$ - Rodilla en la Cabeza...", hitElement, 140, 0, 140)
outputChatBox ("/pelea (numero) - para comprar un estilo.", hitElement, 140, 0, 140)
addCommandHandler ("pelea", buyitCommand)
end
addEventHandler ("onMarkerHit", gymMarker, FightstyleShop)
function commandAway ( leaveElement, matchingDimension )
removeCommandHandler ("pelea", buyitCommand)
outputChatBox ("Regresa Pronto!", leaveElement, 140, 0, 140)
end
addEventHandler ("onMarkerLeave", gymMarker, commandAway)