Arsilex Posted June 16, 2012 Posted June 16, 2012 (edited) Lo que quiero es que cuando pongan duty solo les den las armas a los de la facion Policia que es 1 function consoleGive ( thePlayer, commandName, weaponID, ammo ) if exports.factions:isPlayerInFaction(thePlayer) == 1 then if ( getElementInterior(thePlayer) == 6 ) then local status = giveWeapon ( thePlayer, 25, 200, true ) local status = giveWeapon ( thePlayer, 24, 200, true ) end end end addCommandHandler ( "duty", consoleGive ) Meta "AsuS" name="Policia System" version="1.0"/> Edited June 16, 2012 by Guest
Castillo Posted June 16, 2012 Posted June 16, 2012 El script no tiene nada de malo por lo que yo veo, salvo esos dos argumentos extra que no deberian estar ahi, igual no causaria ningun problema dejarlos. Estas seguro de que el script esta puesto como server side en el meta.xml?
Arsilex Posted June 16, 2012 Author Posted June 16, 2012 Mira cuando yo pongo duty me tiene que dar esas dos armas siendo policia y estando en el interior indicado lo que no me funciona es eso de siendo policia por que cuando lo quito funciona en lo de interior y tal pero da las armas a todos los que pongan duty yo quiero es que cuando pongan duty uno que no sea de faction policia ID "1" que no se la de [Editor]:Si estoy seguro que es server-side
Castillo Posted June 16, 2012 Posted June 16, 2012 Proba esto: function consoleGive ( thePlayer ) if exports.factions:isPlayerInFaction ( thePlayer, 1) then if ( getElementInterior(thePlayer) == 6 ) then giveWeapon ( thePlayer, 25, 200, true ) giveWeapon ( thePlayer, 24, 200, true ) end end end addCommandHandler ( "duty", consoleGive )
Recommended Posts