[How-to] Create commands like /showid and how to make login bar when get in game

do you know how to do it if so could you make a video

This is not something that could be whipped up in a few minutes and would likely takes weeks of scripting. Only a few members here are capable of such in-depth scripting, that’s if it’s even possible.

how do you add more peds to game i have a cop and its working fine but my other peds i put in there arent working

“add other peds to game”…

What does that mean? Spawning additional peds in-game or changing your skin? Be more specific with your requests. It makes it much easier to help you out.

how to you replace peds

You do that the same way as streaming vehicles. See [How-to] Stream vehicles/models from server to client for how to do that.

so if i wanted a highway cop i would have to name the folder highway cop or do i just download the files {example’ a highway cop] and i just place it in /resources /custompeds /stream and put it in there

The highway cop is s_m_y_hwaycop_01, so you would put the ped files in resources/custompeds/stream/s_m_y_hwaycop_01 and that should stream that ped.

Scott

i do and it doesnt’t i get highway come from lspdfr and i put the y files in resources/custompeds/stream/and i place it

All the .y* files should go into resources/custompeds/stream/s_m_y_hwaycop_01. Then make sure you set that resource to auto start by putting it in the citmp-server.yml file in your server root directory.

                         see thats my stream folder the cop files are working but not the highway cop i just added the highway cop files in from lspdfr, what do i do next

I can insist yo help you as a server tech for you?

i would like that do you have skype, oovoo, facetime

@deziel0495 it is possible have you not seen or heard of the server SoE they have the exact thing this guys asking about. when u join SoE they get you to type /login with the account you made on their website.

I never said it wasn’t possible. It would just take alot of scripting and time.

You could use Essentialmode for the command processing. You would create a command “login” and do a database check for the name and password. After that, you would create another command called “showid” and have the client show the user information. As for the UI, you would have to create a custom NUI for that to process the input fields.

For EssentialMode, you would use:

TriggerEvent('es:addCommand', 'login', function(source, args, user)
  if #args > 1 then
    local username = args[2]
    
    -- username would be the first parameter after login, so "/login myusername" would have "myusername" in the username variable
    -- look in database here, you can use the ESM built in MySQL library
  end
end)

-- To do showid using ESM, follow the addCommand info above, look up the user in the DB and Trigger a client event
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 255, 255}, "Put ID info here")

This is just pseudocode. What you want to do is a bit of work and I just wanted to point you to a way to accomplish it. Good luck!

1 Like

you said and i quote ^

I said “that’s if it’s​ even possible”, meaning I don’t know if it’s possible. Nowhere did I say “this is not possible”.

Where do you put it? Im new and retarded so I need some help with that lol.

omg this is my old account smh I was so dumb back then