eldelahoz Posted May 17, 2013 Share 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 ) Link to comment
Castillo Posted May 17, 2013 Share Posted May 17, 2013 Usa "hitElement" en lugar de "luckyBugger" y borra getRandomPlayr. Link to comment
eldelahoz Posted May 17, 2013 Author Share Posted May 17, 2013 Ok pero borro toda la linea de getRamdomPlayer? Link to comment
Lucario Posted May 17, 2013 Share 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 ) Link to comment
Recommended Posts