Chat Commands (/me /do etc)


#1

An old resource i had lying around, @American1’s resource reminded me about it and i have since decided to release it. Like i said, it is an old resource so it isnt the best method but it works perfectly still.

servercommands.rar


[System Chat] Commands /tweet [Error]
Creating a /me bind or script
[Release] [MilitaryRP] - Faction Comms Chat Commands
Hide HUD Script
#2

Is this also for fx servers? Or is it for cfx because it’s an old resource?


#3

Still for fx server, just not made recently.


#4

Awesome @IllusiveTea, great release :smiley:


#5

It’s insane that such a simple script is more popular than a full menu with scenarios and stuff :confused:


#6

Lol it’'s because the /me and /ooc commands are the basis of all RP servers functions.


#7

is their a /ad or a command for making an ad. Thanks


#8

Is there anyway to make them proximity based?


#9

can you add for command /Id x to be able to see as a admin statics, like how many hours did he spend on that server?
Thank you


#10

on the line with the /me what part of the code do I need to change to make it show to only people in proximity ?


#11

how can i fix this in chat ?

if sm[1] == "/me" then
		CancelEvent()
		TriggerClientEvent('chatMessage', -1, "^3Me | ^7" .. name, { 128, 128, 128 }, string.sub(msg,5))
	end

	if sm[1] == "/do" then
		CancelEvent()
		TriggerClientEvent('chatMessage', -1, "^2Do | ^7" .. name, { 128, 128, 128 }, string.sub(msg,5))
	end

	if sm[1] == "/announce" then
		CancelEvent()
		TriggerClientEvent('chatMessage', -1, "^8(Announce) | ^7" .. name, { 255, 255, 255 }, string.sub(msg,5))
	end

	if sm[1] == "/911" then
		CancelEvent()
		TriggerClientEvent('chatMessage', -1, "^8(911) | ^7" .. name, { 255, 255, 255 }, string.sub(msg,5))
	end
	
	if sm[1] == "/bolo" then
		CancelEvent()
		TriggerClientEvent('chatMessage', -1, "^8(Wanted) | ^7" .. name, { 255, 255, 255 }, string.sub(msg,5))
	end
	
	if sm[1] == "/tweet" then
		CancelEvent()
		TriggerClientEvent('chatMessage', -1, "^3(Tweet) | ^7" .. name, { 128, 128, 128 }, string.sub(msg,5))
	end
	
	if sm[1] == "/news" then
        CancelEvent()
        TriggerClientEvent('chatMessage', -1, "^3News", {255, 255, 255}, string.sub(msg,5))
    end
	
    if sm[1] == "/ad" then
        CancelEvent()
        TriggerClientEvent('chatMessage', -1, "^2AD | " .. name, {255, 255, 255}, string.sub(msg,5))
    end
end)

tweet, announce, bolo, news all cause this , is it the length ?


#12

Yes they can only be 3 letters after the /


#13

lol dont commands stupid stuff change the number in string.sub(msg,5))


#14

what would i change it to though


#15

So simple, the /me command send to everyone, its not the way he should work


#16

the nubmer until u get it right smh


#17

Hey guys…
im new to this…
i have copy the folder called: “servercommands” into: resources
and then i have added: starter servercommands

but there is now colours and prefix…
anybody help please? :slight_smile:


#19

Literally just remove the ..name.