How to script a command

we have a script that when you press L it does it i want it to do /radar and works how do i change it ?

This isn’t a release. Don’t post in this section unless you are actually releasing something. Moving.

Before learning how to script. you should really learn how to use the forum, The is for Released scripts only!

1 Like

hmmmmm it does say discussion what do i know i cant script :slight_smile:

That’s because your post has been moved from Releases to Discussion.

cool story it would of been nice if you would of told me this and the anwser to my question thanks anyway i guess :slight_smile:

We did tell you. For the radar script. you need to go back to the part of the forum where you downloaded it. And ask your question there.

basically what im trying to say it how do i script a command for something to work .

You can download a police radar script from here Mobile radar So no need to script one :slight_smile:

If you are asking how to make it so you can do it through /radar all you need to do is this:

RegisterServerEvent("chatMessage")
AddEventHandler("chatMessage", function(source, n, message)
	if message == "/radar" then
		CancelEvent()
		TriggerClientEvent("ClientEvent") -- Change this to your custom client event
	end
end)

fucking hell at least accept your mistake

3 Likes