FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

normalM/citizenfx-go: Golang wrapper for the FiveM natives API · GitHub

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

citizenfx-go

Golang wrapper for the FiveM natives API

package main

import (
	"fmt"
	"syscall/js"

	cfx "github.com/normalM/citizenfx-go"
)

var (
	c  = make(chan bool)
	fn = js.FuncOf
)

func init() {
	cfx.Print(fmt.Sprintf("wasm %s loaded.", cfx.Server.GetCurrentResourceName()))
}
func main() {

	cfx.Server.RegisterCommand("test", fn(func(this js.Value, inputs []js.Value) interface{} {

		cfx.TriggerClientEvent(
			"chat:addMessage",
			-1,
			"TEST!!",
		)
		cfx.Print("DO IT!!!!!!!")

		return nil
	}), false)

	<-c
}

XVer.cloud

About

Golang wrapper for the FiveM natives API

Topics

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL