I’m currently trying to make a command when you type /id to get id from them
– ID COMMAND (/id [Message]) Outcomes: Action: Name Message
TriggerEvent(‘es:addCommand’, ‘id’, function(source, args, user)
table.remove(args, 1)
TriggerClientEvent(‘chatMessage’, -1, “^1PlayerId”, {255, 0, 0}, " ^0 " … GetPlayerName(source) …" " … (GetPlayerPed(GetPlayerFromServerId(PID))(source) …" “…”^0 " … table.concat(args, " "))
end, function(source, args, user)
TriggerClientEvent(‘chatMessage’, source, “SYSTEM”, {255, 0, 0}, “Insufficienct permissions!”)
end)
I need help, it does not work, what would I need to fix/add?
2 Likes
chefslaya:
– ID COMMAND (/id [Message]) Outcomes: Action: Name MessageTriggerEvent(‘es:addCommand’, ‘id’, function(source, args, user) table.remove(args, 1) TriggerClientEvent(‘chatMessage’, -1, “^1PlayerId”, {255, 0, 0}, " ^0 " … GetPlayerName(source) …" " … (GetPlayerPed(GetPlayerFromServerId(PID))(source) …" “…”^0 " … table.concat(args, " "))end, function(source, args, user) TriggerClientEvent(‘chatMessage’, source, “SYSTEM”, {255, 0, 0}, “Insufficienct permissions!”)end)
I don’t exactly get what you’re trying to do with this command? Are you trying to display the persons ID when they type ‘/id’?
yes, im trying to make it display id when typed /id
1 Like
@chefslaya did you figure this out. please pm me
Has there been anything yet?
I Need this Script too. Can you help me <3
I got this script that I made it by myself…
Your that part of the community that posts useless info, if you see that we all are asking for it and it has a lot of views why don’t you release it instead of just saying here that “I made it”.
RegisterCommand('id', function(source, args)
TriggerEvent('chatMessage', "[".. "ID" .. "]" , {0, 0, 255}, " ^5 YOUR CURRENT ID IS : " .. GetPlayerServerId(source))
end, false)
1 Like
rezaCyber:
RegisterCommand('id', function(source, args)
TriggerEvent('chatMessage', "[".. "ID" .. "]" , {0, 0, 255}, " ^5 YOUR CURRENT ID IS : " .. GetPlayerServerId(source))
end, false)
i was so close to scripting this, but then i scrolled down and found it. So i deleted what i made
Note: this is a client side script. what you was trying to make was server side. Make sure to add it in resource file as client side