- The
sampAPI module contains functions used to control an open.mp server. Use the API module using:
requires samp
{
...
}To use a specific component of the samp API module, do the following:
requires samp
{
using @global
}- You can do the following:
requires samp
{
using @global for
{
@global.setserverattrib.hostname("My Server")
}
}This function is used to update server attributes. NOTE: This function has no non-method configuration, so you need to use a method in order to specify a server attribute.
- Used to change the server hostname:
requires samp
{
using @global
}
@global.setserverattrib.hostname("My Server")- This component module contains following callbacks:
- This callback gets called once the server starts.
@extern
this->struct=callback
int @onserverinit() public
{
console.println.log("@onserverinit called!")
void inlinefunc() inline
<
console.println.log("INLINE WORKS!")
>
user.inlinefunc
console.println.log("end")
return int 1
}