DeathMta Posted September 10, 2015 Posted September 10, 2015 function AutoDeath ( player ) if getElementType ( thePlayer ) == "player" then local cuenta = getPlayerAccount( player ) local x, y, z = getElementPosition(player) local accountName = ( cuenta and getAccountName ( cuenta ) or "" ) if not( accountName == "123") then vehiculo = createVehicle(422, x + 5, y, z) Interior = createColSphere(x + 5, y, z, 4) attachElements(Interior, vehiculo, 0, 0, 0) setElementData(Interior, "parent", vehiculo) setElementData(vehiculo, "parent", Interior) setElementData(Interior, "vehicle", true) setElementData(Interior, "MAX_Slots", 20) setElementData(Interior, "Tire_inVehicle", 4) setElementData(Interior, "Engine_inVehicle", 1) setElementData(Interior, "Parts_inVehicle", 1) setElementData(Interior, "fuel", 80) outputChatBox("[Death]:Te Has Equipado",player,84, 84, 84,true) else outputChatBox("No Eres Death Para Usar Este Comando",player,84,84,84,true) end end end addCommandHandler("death1",AutoDeath) Nesecitas Ayudas solo Mandame PM!! Death Scripts Ayudando a la comunidad sin fines de lucro!
JR10 Posted September 10, 2015 Posted September 10, 2015 The function's first argument is clearly 'player', yet you're using thePlayer. if getElementType ( player ) == "player" then Then the logic issue, this is a command handler, vehicles can't execute commands, or any other non-player element type for that matter. So, you don't need to check for the type because it will always be a player. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now