Jump to content
  • 0

I can't put a string with spaces in addcommandhandler


Fivenon

Question

 

I can't put a string with spaces in addcommandhandler

I already tried with "work " .. "pilot" but it doesn't work

 

taxistaJ = false
pilotoJ = false 

Taxista = "Ser " .. "taxista"

function TaxiInicio(player, commandName, Taxista, Piloto)

    if (commandName == "ser")then 
        outputChatBox("Ser (taxista, piloto)", player)
    end

    if (commandName == "ser " .. "taxista")then
        taxistaJ = true 
        pilotoJ = false
        outputChatBox("Has renunciado a tu anterior trabajo y ahora trabajas como taxista",player)
    end

    if (commandName == "ser " .. "piloto")then 
        taxistaJ = false 
        pilotoJ = true 
        outputChatBox("Has renunciado a tu anterior trabajo y ahora trabajas como piloto")
    end
end
addCommandHandler("ser", TaxiInicio)
addCommandHandler("ser " .. "taxista", TaxiInicio)

 

Edited by Fivenon
Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...