Jump to content

Command account


BorderLine

Recommended Posts

Posted

Hi forum :)

Well i was trying to make this script

this is about respawn my own car with a command, but just i want do this command, no other players

so i did this

  
function yakuza() 
    local account = getPlayerAccount ( thePlayer ) 
if account == "yakuza" then 
        outputChatBox ( "You cant make this use", thePlayer, 255, 200, 0 ) 
else 
respawnVehicle ( vehicle1 ) 
    end 
end 
addCommandHandler("respawnmycar", yakuza) 
  

its a server side

thx

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

You did it the wrong way around ;3

function yakuza() 
    local account = getPlayerAccount ( thePlayer ) 
if account == "yakuza" then 
respawnVehicle ( vehicle1 ) 
    
else 
        outputChatBox ( "You cant make this use", thePlayer, 255, 200, 0 ) 
    end 
end 
addCommandHandler("respawnmycar", yakuza) 

Posted
function yakuza(thePlayer) 
    local account = getPlayerAccount ( thePlayer ) 
if not isGuestAccount(account) and getAccountName(account) == "yakuza" then 
respawnVehicle ( vehicle1 ) 
else 
        outputChatBox ( "You cant make this use", thePlayer, 255, 200, 0 ) 
    end 
end 
addCommandHandler("respawnmycar", yakuza) 

Is vehicle1 a global variable?

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

Posted

its a personal car.. with account to

but this work JR10

thx so much :)

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

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...