sendXtMessage()
Availability:
SmartFoxServer Pro
Usage:
smartFox.sendXtMessage(xtName <String>, cmdName <String>, paramObj <propList>, type <String>, roomId <integer>)
Description:
Sends a request to an extension in the current Zone / Room
Parameters:
xtName | name of the extension to call | |
cmdName | name of the command to execute in the extension | |
paramObj | a propertylist containing all the data to pass to the extension | |
type | can be "xml" or "str", based on the type of protocol you want to use. By default "xml" is used | |
roomId | (optional) the id of the room where the request is coming from |
Returns:
Fires the onExtensionResponse event
Example:
// A bullet is being fired // Let's notify the server side extension request =[#type:"bullet", #posx:100, #posy:200, #speed:10, #angle:45]
// Invoke "fire" command on the extension called "gameExt" smartFox.sendXtMessage("gameExt", "fire", request)
See also:
onPublicMessage, sendPrivateMessage()