eldelahoz Posted May 17, 2013 Posted May 17, 2013 Hola como puedo hacer para que al escribir el comando le de la bici pero no en random player si no a solamente el player que la escribe function CreateCoche (hitElement) local skin = getPlayerSkin ( hitElement ) if skin == 100 then local luckyBugger = getRandomPlayer() local x, y, z = getElementPosition ( luckyBugger ) Bici = createVehicle ( 510, x +2, y, z +2) setVehicleColor( Bici, 127, 0, 0 ) end end addCommandHandler ( "bici", CreateCoche )
Castillo Posted May 17, 2013 Posted May 17, 2013 Usa "hitElement" en lugar de "luckyBugger" y borra getRandomPlayr.
eldelahoz Posted May 17, 2013 Author Posted May 17, 2013 Ok pero borro toda la linea de getRamdomPlayer?
Lucario Posted May 17, 2013 Posted May 17, 2013 function CreateCoche (hitElement) local skin = getPlayerSkin ( hitElement ) if skin == 100 then local x, y, z = getElementPosition ( hitElement ) Bici = createVehicle ( 510, x +2, y, z +2) setVehicleColor( Bici, 127, 0, 0 ) end end addCommandHandler ( "bici", CreateCoche )
Recommended Posts