Narutimmy Posted November 7, 2013 Posted November 7, 2013 Hola quiero hacer un script que al precionar la Tecla "b" se cree un pickup de dinero en el piso y otro usuario lo pueda tomar y que suene un sonido que solo escuche el que lo precione... Asi esta bien? function DropMoney (thePlayer) x,y,z = getElementPosition ( source ) money = createPickup ( x + 3,y,z, 3, 1212,0 ) - if money then if (getPlayerMoney() <= 50) then x,y,z = getElementPosition ( source ) money = createPickup ( x + 3,y,z, 3, 1212,0 ) takePlayerMoney(thePlayer, 50) playSound ( "Money.mp3" ) function GivePlayerMoney (thePlayer) givePlayerMoney ( thePlayer, 50 ) destroyElement ( source ) end addEventHandler ( "onPickupHit", money, GivePlayerMoney ) end end end bindKey ( thePlayer,"b","down",DropMoney )
Narutimmy Posted November 7, 2013 Author Posted November 7, 2013 No tiene ningun sentido el script ese. .___. nunca lo tienen, gracias
Recommended Posts