29.08.2015, 17:38
(
Последний раз редактировалось Fancy; 29.08.2015 в 19:25.
)
The [FilterScript] tag on the topic is an accident
m_teleport.inc
This is my first include release which makes it easier and faster to make teleports.
Functions
playerid - The id of the player for which you want to use this function.
Float:x - x cordinates of the teleport
Float:y - y cordinates of the teleport
Float:z - z cordinates of the teleport
Float:FacingAngle - Facing angle for the teleport
world - virtual world of the teleport (set 0 for default)
interior - interior of the teleport
showmessage - toggle teleport message
message[] - the message (This is used for showing teleport name,it will only work if the "show message" is true
style - as the messsage will be in GameText so you will have to enter the style
sound - toggle playing sound on teleport
camreset - Used to set player camera behind the player
telemessage - this will show a message to all players (example: Max has teleported to "telename[]" ("telecommand[]"))
telename[] - the name of the teleport to show in the global teleport message (only works when the "telemessage" is true)
telecommand[] - the command of the teleport to show in the global teleport message (only works when the "telemessage" is true)
Usage
1.Add the m_teleport/inc in the "/pawno/includes" folder
2.Add this after a_samp include and before including m_teleport
(This will be used as global teleport message color if you have enabled the global message in teleport)
3.Include the m_teleport
Example Script
Download
m_teleport.inc
This is my first include release which makes it easier and faster to make teleports.
Functions
Код:
stock Teleport(playerid, Float:x, Float:y, Float:z, Float:FacingAngle, world, interior, showmessage, message[], style, sound, camreset, telemessage, telename[], telecommand[])
Float:x - x cordinates of the teleport
Float:y - y cordinates of the teleport
Float:z - z cordinates of the teleport
Float:FacingAngle - Facing angle for the teleport
world - virtual world of the teleport (set 0 for default)
interior - interior of the teleport
showmessage - toggle teleport message
message[] - the message (This is used for showing teleport name,it will only work if the "show message" is true
style - as the messsage will be in GameText so you will have to enter the style
sound - toggle playing sound on teleport
camreset - Used to set player camera behind the player
telemessage - this will show a message to all players (example: Max has teleported to "telename[]" ("telecommand[]"))
telename[] - the name of the teleport to show in the global teleport message (only works when the "telemessage" is true)
telecommand[] - the command of the teleport to show in the global teleport message (only works when the "telemessage" is true)
Usage
1.Add the m_teleport/inc in the "/pawno/includes" folder
2.Add this after a_samp include and before including m_teleport
Код:
#define TeleMessageColor 0xFFFFFFFF
3.Include the m_teleport
Example Script
Код:
#include <a_samp> #define TeleMessageColor 0x33AA33AA /*Define this before including the m_teleport include.You can use costome color,it will be used for global message color*/ #include <m_teleport> #define FILTERSCRIPT public OnFilterScriptInit() { return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/teleport", cmdtext, true, 10) == 0) { Teleport(playerid, 0,/*x cordinates*/ 0,/*y cordinates*/ 5,/*z cordinates*/ 0,/*facing angle cordinates*/ 0,/*virtual world*/ 0,/*interior*/ true /*it will show the message as it is "true"*/, "Example"/*it will show a game text message to the player*/, 6/*here we set the game test style to 6*/, true/*here we allowed the sound to be played*/, true/*it will set the players camers behind him/her */, true/*here we allowed the global teleport message*/, "Example"/*The teleport name in global message will be shown as "Example"*/, "/teleport"/*the teleport command in the global message will be "/teleport" now the final global message output is : "PlayerNameWillBeShowHere" teleported to Example (/teleport)*/); return 1; } return 0; }