Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*______________________________________________________________________________________________________
- Sistema de Portões By Sky ™
- Versão Zcmd
- Commands
- /logaradm
- /criarportao [model]
- /editarportao [id]
- /liberarportao [id]
- /darchave [id] [portao iD]
- /copiachave [id] [portao-id]
- /tomarchave [id]
- /abrirg [id]
- /fecharg [id]
- /infoportao
- /infoportaoid [portao-id]
- ________________________________________________________________________________________________________________*/
- //Includes
- #include < a_samp > //SA-MP TeaM
- #include < zcmd > //Zeex's Include
- #include < streamer > //icognito's Include
- #include < dof2 > //Double-o-sevem.
- #include < sscanf2 > //y_Less Include
- #include <streamer>
- #if defined FILTERSCRIPT
- //macros
- #define TextDrawUser
- // Loop
- #define _Loop(%0,%1) for(new %0 = 0; %0 < %1; %0++)
- #define PassLog "Suasenha" // senha para logar no Sistema!
- #define MAX_GATES 50 //Maximo de Portões
- #define P_GATES "/Gates/g%d.ini" //Diretorio Portões
- //dialogs
- #define SkLogin 0
- #define Index 1
- #define ModelID 2
- #define EditPos 3
- #define EditModel 4
- #define InfosGateEdit 5
- #define SaveGate 6
- #define DeletGate 7
- #define EditSpeed 8
- #define Dinu 9
- //variaveis
- new
- bool:Logado@_[ MAX_PLAYERS ],
- GateID[ MAX_PLAYERS ],
- stx_[ 129 ],
- _log[129],
- gfile[ 30 ],
- _Dat[ 3 ],
- Float:Pos[ 3 ],
- Float:Rot[ 3 ],
- #if defined TextDrawUser
- PlayerText:InfG[ 6 ][ MAX_PLAYERS ],
- #endif
- proxgate
- ;
- //CallBacks
- public OnPlayerConnect( playerid ){
- RessetPvars( playerid );
- #if defined TextDrawUser
- LoadPlayerTexts( playerid );
- #endif
- return true;
- }
- public OnPlayerDisconnect( playerid ) {
- RessetPvars( playerid );
- return true;
- }
- public OnFilterScriptInit(){
- print("\n");
- print("|_____________________________|");
- print("| | ");
- print("| SK Portão Editor Loaded .. | ");
- print("| Copyright © 2012-2013 | ");
- print("| | ");
- print("| Sky™ | ");
- print("|_____________________________| ");
- print("\n");
- LoadGates();
- return true;
- }
- public OnFilterScriptExit(){
- for( new _i = 0; _i < GetMaxPlayers( ) ; _i++ ){
- RessetPvars( _i );
- }
- unloadGates( );
- DOF2_Exit( );
- print("\n\n\r SK Portão Editor unLoaded ..\n\n");
- return true;
- }
- public OnPlayerClickPlayerTextDraw( playerid, PlayerText:playertextid){
- if( playertextid == InfG[ 5 ][ playerid ] ) {
- _Loop( t, sizeof( InfG ) ){
- PlayerTextDrawHide( playerid, InfG[ t ][ playerid ] );
- }
- CancelSelectTextDraw( playerid );
- }
- return true;
- }
- //Comandos
- CMD:logaradm( playerid){
- if( Logado@_[ playerid ] == true)
- return SendClientMessage( playerid , -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você ja está Logado.");
- ShowPlayerDialog( playerid, SkLogin, DIALOG_STYLE_INPUT, "Logar", "{FFFFFF}Digite a Senha para Logar-se no sistema:\n\n{33AA33}Caso Erre a senha será kickado imediatamente.", "Logar", "Sair");
- return 1;
- }
- CMD:ajudaportao( playerid){
- strins( stx_, "{16EB43}Comandos\n", strlen( stx_ ) );
- strins( stx_, "{FFFFFF}/logaradm\n\n", strlen( stx_ ) );
- strins( stx_, "{FFFFFF}/infoportao\n", strlen( stx_ ) );
- strins( stx_, "/infoportaoid [portao-id]\n", strlen( stx_ ) );
- strins( stx_, "/darcopia [id] [portao-id]\n", strlen( stx_ ) );
- strins( stx_, "/tomarchave [nick] [portao-id]\n", strlen( stx_ ) );
- strins( stx_, "/liberarportao [portao-id]\n", strlen( stx_ ) );
- strins( stx_, "/criarportao [modelo-id]\n", strlen( stx_ ) );
- strins( stx_, "/editarportao [portao-id]\n", strlen( stx_ ) );
- ShowPlayerDialog( playerid, Dinu, DIALOG_STYLE_MSGBOX, "Ajuda", stx_, "OK", "");
- return 1;
- }
- CMD:criarportao( playerid,params[]){
- if(!Logado@_[ playerid ]) return SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você não tem permissão."), 1;
- if(isnull( params ) ){
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/criarportao [modelo]");
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Modelos Mais usados: 969, 971, 980");
- return true;
- }
- else
- GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
- PlayerCreateGate( playerid, strval( params ), Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], GetPlayerInterior( playerid ) );
- return true;
- }
- CMD:editarportao( playerid, params[]){
- if(Logado@_[ playerid ] == true)
- {
- if(isnull( params ) ){
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/editarportao [portao-id]");
- return true;
- }
- format( gfile, sizeof( gfile ), P_GATES, strval( params ) );
- if(DOF2_FileExists( gfile ) )
- {
- if(IsPlayerInRangeOfPoint( playerid, 20.0, DOF2_GetFloat( gfile, "fPosX" ), DOF2_GetFloat( gfile, "fPosY"), DOF2_GetFloat( gfile, "fPosZ") ) )
- {
- SetPVarInt( playerid, "PastID", strval( params ) );
- SetPVarInt( playerid, "GateEdit2", DOF2_GetInt( gfile, "Id") );
- GateID[ playerid ] = DOF2_GetInt( gfile, "Model" );
- ShowIndexFor( playerid );
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você está muito longe do portão!");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Valor inválido, tente novamente!");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você não tem permissão.");
- }
- return true;
- }
- CMD:abrirg( playerid, params[]){
- if(isnull( params ) ){
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/abrirg [portao-id]");
- return true;
- }
- format( gfile, sizeof( gfile ), P_GATES, strval( params ) );
- if(DOF2_FileExists( gfile ) )
- {
- if(IsPlayerOwner( playerid, strval( params ) ))
- {
- if(IsPlayerInRangeOfPoint( playerid, 20.0, DOF2_GetFloat( gfile, "fPosX"), DOF2_GetFloat( gfile, "fPosY" ), DOF2_GetFloat( gfile, "fPosZ") ) )
- {
- MoveDynamicObject( DOF2_GetInt( gfile, "Id2" ), DOF2_GetFloat( gfile, "aPosX" ), DOF2_GetFloat( gfile, "aPosY" ), DOF2_GetFloat( gfile, "aPosZ" ), DOF2_GetInt( gfile, "Speed"));
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão Aberto.");
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você está muito longe do portão!");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Este portão não lhe pertence.!");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Valor inválido, tente novamente!");
- }
- return true;
- }
- CMD:fecharg( playerid, params[]){
- if(isnull( params ) ) return
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/fecharg [portao-id]");
- format( gfile, sizeof( gfile ), P_GATES, strval( params ) );
- if(DOF2_FileExists( gfile ) )
- {
- if(IsPlayerOwner( playerid, strval( params ) ))
- {
- if(IsPlayerInRangeOfPoint( playerid, 20.0, DOF2_GetFloat( gfile, "fPosX"), DOF2_GetFloat( gfile, "fPosY"), DOF2_GetFloat( gfile, "fPosZ") ))
- {
- MoveDynamicObject(DOF2_GetInt( gfile, "Id2"), DOF2_GetFloat( gfile, "fPosX"), DOF2_GetFloat( gfile, "fPosY"), DOF2_GetFloat( gfile, "fPosZ"), DOF2_GetInt( gfile, "Speed"));
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão Fechado.");
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você está muito longe do portão!");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Este portão não lhe pertence!");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Valor inválido, tente novamente!");
- }
- return true;
- }
- CMD:infoportao( playerid, params[]){
- for(new portao = 0; portao < MAX_GATES; portao++)
- {
- format( gfile, sizeof( gfile ), P_GATES, portao);
- if(DOF2_FileExists( gfile ) )
- {
- if(IsPlayerInRangeOfPoint( playerid, 20.0, DOF2_GetFloat( gfile, "fPosX"), DOF2_GetFloat( gfile, "fPosY"), DOF2_GetFloat( gfile, "fPosZ") ))
- {
- #if defined TextDrawUser
- _Loop(_s, sizeof(InfG) ){
- PlayerTextDrawShow( playerid, InfG[_s][playerid]);
- }
- format(stx_, sizeof(stx_), "%s~n~_~n~%d~n~_~n~%s~n~_~n~%s~n~_~n~%s", DOF2_GetString( gfile, "Dono"), portao, DOF2_GetString( gfile, "CopyKey1"), DOF2_GetString( gfile, "CopyKey2"), DOF2_GetString( gfile, "CopyKey3") );
- PlayerTextDrawSetString( playerid, InfG[ 3 ][ playerid ], stx_);
- SelectTextDraw( playerid, 0x16EB43AA);
- #else
- format(stx_, sizeof(stx_), "{33AAFF}Portão ID: %d | Dono: %s", portao, DOF2_GetString( gfile, "Dono") );
- SendClientMessage( playerid, -1, stx_);
- format(stx_, sizeof(stx_), "{33AAFF}Cópias da chave com: %s, %s, %s", DOF2_GetString( gfile, "CopyKey1"), DOF2_GetString( gfile, "CopyKey2"), DOF2_GetString( gfile, "CopyKey3") );
- SendClientMessage( playerid, -1, stx_);
- #endif
- return true;
- }
- }
- }
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Não tem nenhum portão válido por perto!");
- return true;
- }
- CMD:infoportaoid( playerid, params[]){
- if(isnull( params ) )
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/infoportaoid [id]");
- return true;
- }
- format( gfile, sizeof( gfile ), P_GATES, strval( params ));
- if(DOF2_FileExists( gfile ) )
- {
- #if defined TextDrawUser
- _Loop(_s, sizeof(InfG) ){
- PlayerTextDrawShow( playerid, InfG[_s][playerid]);
- }
- format(stx_, sizeof(stx_), "%s~n~_~n~%d~n~_~n~%s~n~_~n~%s~n~_~n~%s", DOF2_GetString( gfile, "Dono"), strval( params ), DOF2_GetString( gfile, "CopyKey1"), DOF2_GetString( gfile, "CopyKey2"), DOF2_GetString( gfile, "CopyKey3") );
- PlayerTextDrawSetString( playerid, InfG[ 3 ][ playerid ], stx_);
- SelectTextDraw( playerid, 0x16EB43AA);
- #else
- format(stx_, sizeof(stx_), "{33AAFF}Portão ID: %d | Dono: %s", gid, DOF2_GetString( gfile, "Dono") );
- SendClientMessage( playerid, -1, stx_);
- format(stx_, sizeof(stx_), "{33AAFF}Cópias da chave com: %s, %s, %s", DOF2_GetString( gfile, "CopyKey1"), DOF2_GetString( gfile, "CopyKey2"), DOF2_GetString( gfile, "CopyKey3") );
- SendClientMessage( playerid, -1, stx_);
- #endif
- }
- return true;
- }
- CMD:darchave( playerid, params[]){
- static
- plid, gtid
- ;
- if( sscanf(params, "ud", plid, gtid) )
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/darchave [id] [portão-id]");
- }
- else
- {
- format( gfile, sizeof( gfile ), P_GATES, gtid);
- if(DOF2_FileExists( gfile ) )
- {
- if(Logado@_[playerid] == true)
- {
- if (IsPlayerConnected(plid))
- {
- if(DOF2_GetInt( gfile, "SDono") == 0)
- {
- DOF2_SetString( gfile, "Dono", _GetSkName(plid) );
- DOF2_SetInt( gfile, "SDono", 1);
- format(stx_, sizeof(stx_), "{33AAFF}O(A) ADM {%06x}%s {33AAFF}te deu a chave do portão: {FFFFFF}%d", GetPlayerColor( playerid ) >>> 8, _GetSkName( playerid ), gtid);
- SendClientMessage(plid, -1, stx_);
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Comando efetuado com sucesso!");
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Este portão já tem dono!");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Player não conectado.");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você não tem permissão.");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão inválido, tente novamente!");
- }
- }
- return true;
- }
- CMD:darcopia( playerid, params[]){
- static
- p, d
- ;
- if( sscanf(params, "ud", p, d) )
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/darcopia [id] [portão-id]");
- }
- else
- {
- format( gfile, sizeof( gfile ), P_GATES, d);
- if(DOF2_FileExists( gfile ) )
- {
- if( strcmp( DOF2_GetString( gfile, "Dono"), _GetSkName( playerid ), false) == 0 || Logado@_[ playerid ] == true)
- {
- if( strcmp( DOF2_GetString( gfile, "CopyKey1"), "Ninguem", true) == 0)
- {
- DOF2_SetString( gfile, "CopyKey1", _GetSkName( p ) );
- format( stx_, sizeof( stx_ ), "%s {33AAFF}te deu uma cópia da chave do portão: {FFFFFF}%d", _GetSkName( playerid ), d);
- SendClientMessage( p, GetPlayerColor( playerid ), stx_ );
- format( stx_, sizeof( stx_ ), "{33AAFF}você deu uma copia da chave de seu portão há: {%06x}%s", GetPlayerColor( p ) >>> 8, _GetSkName( p ) );
- SendClientMessage( playerid, -1, stx_ );
- return true;
- }
- if( strcmp( DOF2_GetString( gfile, "CopyKey2"), "Ninguem", true) == 0)
- {
- DOF2_SetString( gfile, "CopyKey2", _GetSkName( p ) );
- format( stx_, sizeof( stx_ ), "%s {33AAFF}te deu uma cópia da chave do portão: {FFFFFF}%d", _GetSkName( playerid ), d);
- SendClientMessage( p, GetPlayerColor( playerid ), stx_ );
- format( stx_, sizeof( stx_ ), "{33AAFF}você deu uma copia da chave de seu portão há: {%06x}%s", GetPlayerColor( p ) >>> 8, _GetSkName( p ) );
- SendClientMessage( playerid, -1, stx_ );
- return true;
- }
- if( strcmp( DOF2_GetString( gfile, "CopyKey3"), "Ninguem", true) == 0)
- {
- DOF2_SetString( gfile, "CopyKey3", _GetSkName( p ) );
- format( stx_, sizeof( stx_ ), "%s {33AAFF}te deu uma cópia da chave do portão: {FFFFFF}%d", _GetSkName( playerid ), d);
- SendClientMessage( p, GetPlayerColor( playerid ), stx_ );
- format( stx_, sizeof( stx_ ), "{33AAFF}você deu uma copia da chave de seu portão há: {%06x}%s", GetPlayerColor( p ) >>> 8, _GetSkName( p ) );
- SendClientMessage( playerid, -1, stx_ );
- return true;
- }
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}O limite de chaves foi ecedido!");
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você não é dono deste portão.");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão inválido, tente novamente!");
- }
- }
- return true;
- }
- CMD:tomarchave( playerid, params[]){
- new
- nick[24], d
- ;
- if( sscanf(params, "s[24]d", nick, d) )
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/tomarchave [nick] [portão-id]");
- return true;
- }
- format( gfile, sizeof( gfile ), P_GATES, d);
- if(DOF2_FileExists( gfile ) )
- {
- if( strcmp(DOF2_GetString( gfile, "Dono"), _GetSkName( playerid ), false) == 0 || Logado@_[ playerid ] == true)
- {
- if( strcmp(DOF2_GetString( gfile, "CopyKey1"), nick, true) == 0)
- {
- DOF2_SetString( gfile, "CopyKey1", "Ninguem");
- format( stx_, sizeof( stx_ ), "{33AAFF}Você tomou a chave de {FFFFFF}%s {33AAFF}agora ele(a) não tem acesso a chave do portão!", nick);
- SendClientMessage( playerid, -1, stx_ );
- return true;
- }
- if( strcmp(DOF2_GetString( gfile, "CopyKey2"), nick, true) == 0)
- {
- DOF2_SetString( gfile, "CopyKey2", "Ninguem");
- format( stx_, sizeof( stx_ ), "{33AAFF}Você tomou a chave de {FFFFFF}%s {33AAFF}agora ele(a) não tem acesso a chave do portão!", nick);
- SendClientMessage( playerid, -1, stx_ );
- return true;
- }
- if( strcmp(DOF2_GetString( gfile, "CopyKey3"), nick, true) == 0)
- {
- DOF2_SetString( gfile, "CopyKey3", "Ninguem");
- format( stx_ , sizeof( stx_ ), "{33AAFF}Você tomou a chave de {FFFFFF}%s {33AAFF}agora ele(a) não tem acesso a chave do portão!", nick);
- SendClientMessage( playerid, -1, stx_ );
- return true;
- }
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Verifique se digitou o nick corretamente!");
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você não é dono deste portão.");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão inválido, tente novamente!");
- }
- return true;
- }
- CMD:liberarportao( playerid, params[]){
- static
- d, p
- ;
- if( sscanf(params, "d", d) )
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/liberarportao [portão-id]");
- return true;
- }
- format( gfile, sizeof( gfile ), P_GATES, d);
- if(DOF2_FileExists( gfile ) )
- {
- if(Logado@_[ playerid ] == true)
- {
- if(!(DOF2_GetInt( gfile, "SDono") == 3) )
- {
- DestroyDynamicObject(DOF2_GetInt( gfile, "Id2") );
- }
- p = CreateDynamicObject(DOF2_GetInt( gfile, "Model"), DOF2_GetFloat( gfile, "fPosX"), DOF2_GetFloat( gfile, "fPosY"), DOF2_GetFloat( gfile, "fPosZ"), DOF2_GetFloat( gfile, "fPosRX"), DOF2_GetFloat( gfile, "fPosRY"), DOF2_GetFloat( gfile, "fPosRZ"), -1, -1, -1, 200.0);
- DOF2_SetInt( gfile, "Id2", p);
- DOF2_SetString( gfile, "Dono", "Ninguem");
- DOF2_SetString( gfile, "CopyKey1", "Ninguem");
- DOF2_SetString( gfile, "CopyKey2", "Ninguem");
- DOF2_SetString( gfile, "CopyKey3", "Ninguem");
- DOF2_SetInt( gfile, "SDono", 0);
- format( stx_, sizeof( stx_ ), "{33AAFF}O(A) ADM {%06x}%s {33AAFF}liberou o portão: {FFFFFF}%d", GetPlayerColor( playerid ) >>> 8,_GetSkName( playerid ), d);
- SendClientMessageToAll(-1, stx_ );
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você não tem permissão.");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão inválido, tente novamente!");
- }
- return true;
- }
- CMD:irportao( playerid, params[]){
- if(Logado@_[playerid] == true){
- if(isnull( params ) )
- {
- SendClientMessage( playerid, -1, "{FF0000}{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}/irportao [id]");
- return true;
- }
- format( gfile, sizeof( gfile ), P_GATES, strval( params ));
- if(DOF2_FileExists( gfile ) )
- {
- SetPlayerInterior( playerid, DOF2_GetInt( gfile, "IntID") );
- SetPlayerPos( playerid, DOF2_GetFloat( gfile, "fPosX")+2, DOF2_GetFloat( gfile, "fPosY")+2, DOF2_GetFloat( gfile, "fPosZ") );
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portao ID invalido.");
- }
- }
- else
- {
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Você não tem permissão.");
- }
- return true;
- }
- public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid){
- case SkLogin: {
- if(response)
- {
- if( strcmp( inputtext, PassLog, true ) == 0 )
- {
- SendClientMessage( playerid, -1, "Logado com Sucesso! tenha um bom dia.");
- Logado@_[ playerid ] = true;
- }
- else
- {
- format( stx_, sizeof( stx_ ), "{FF0000}| {33AA33}SK Editor {FF0000}| {33AAFF} %s Foi Kickado. Motivo: Errou Senha Sk FS", _GetSkName( playerid ) );
- SendClientMessageToAll( -1, stx_ );
- Kick( playerid );
- }
- }
- return true;
- }
- case Index: {
- if( response ){
- switch(listitem){
- case 0: ShowPlayerDialog( playerid, EditModel, DIALOG_STYLE_INPUT, "Model",
- "{FFFFFF}2933, 975, 976, 988, 989, 991\n7657, 3050, 3049, 3036, 2990, 2488\n2930, 2409\n{FFFF00}Os modelos citados acima são os mais usados\nDigite algum dos Modelos na area abaixo:\n", "Mudar", "Voltar");
- case 1:{
- format( gfile, sizeof( gfile ), P_GATES, GetPVarInt( playerid, "PastID") );
- EditPlayerObject( playerid, DOF2_GetInt( gfile, "Id") );
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Editando Cordenadas do Portão.");
- }
- case 2: {
- ShowPlayerDialog( playerid, EditSpeed, DIALOG_STYLE_INPUT,
- "Velocidade", "Os portões ao serem criados vem com uma velocidade padrão 4\nvocê pode modificar esta velocidade digitando um valor de 1 a 6", "Ok","Voltar");
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Editando Velocidade do Portão.");
- }
- case 3: {
- ShowPlayerDialog( playerid, SaveGate, DIALOG_STYLE_LIST, "Salvando Edição", "Salvar Pos Fechado\nSalvar Pos Aberto\nTerminar Edição", "OK", "Voltar");
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Processo de salvamento do Portão.");
- }
- case 4: ShowPlayerDialog( playerid, DeletGate, DIALOG_STYLE_MSGBOX, "Deletar Edição", "{FFFFFF}Ao deletar um portão podera recupera-lo a qualquer hora /portoesdeletados\n\ntem certeza que deseja deletar essa edição?", "Deletar", "Voltar");
- }
- }
- }
- case EditModel: {
- if( response ){
- if( IsNumeric( inputtext ) ){
- if( StrToInt( inputtext ) == 969 || StrToInt( inputtext ) == 971 || StrToInt( inputtext ) == 975 || StrToInt( inputtext ) == 976 || StrToInt( inputtext ) == 980 || StrToInt( inputtext ) == 985 || StrToInt( inputtext ) == 986 || StrToInt( inputtext ) == 988 || StrToInt( inputtext ) == 989
- || StrToInt( inputtext ) == 991 || StrToInt( inputtext ) == 2409 || StrToInt( inputtext ) == 2488 || StrToInt( inputtext ) == 2930 || StrToInt( inputtext ) == 2933 || StrToInt( inputtext ) == 7657 || StrToInt( inputtext ) == 3050 || StrToInt( inputtext ) == 3049 || StrToInt( inputtext ) == 3036 || StrToInt( inputtext ) == 2990
- || StrToInt( inputtext ) == 2988 || StrToInt( inputtext ) == 2909){
- GateID[ playerid ] = StrToInt( inputtext );
- AtualizeObject( playerid );
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Modelo Alterado com Sucesso!");
- ShowIndexFor( playerid );
- }
- else {
- ShowPlayerDialog( playerid, EditModel, DIALOG_STYLE_INPUT, "Model", "{FFFFFF}Digite o Modelo/ID para Adaptar ao Portão\n\n{33AA33}Modelos Constantemente usados: {FFFF00}969, 971, 980", "Mudar", "Voltar");
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Modelo Invalido!");
- }
- }
- else{
- ShowPlayerDialog( playerid, EditModel, DIALOG_STYLE_INPUT, "Model", "{FFFFFF}Digite o Modelo/ID para Adaptar ao Portão\n\n{33AA33}Modelos Constantemente usados: {FFFF00}969, 971, 980", "Mudar", "Voltar");
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}use apenas Valores Númericos!");
- }
- }
- else {
- ShowIndexFor( playerid );
- }
- }
- case EditSpeed: {
- if(response){
- if( IsNumeric( inputtext ) ){
- if(1 <= StrToInt( inputtext ) <= 6){
- format( gfile, sizeof( gfile ), P_GATES, GetPVarInt( playerid, "PastID") );
- DOF2_SetInt( gfile, "Speed", StrToInt( inputtext ));
- DOF2_SaveFile();
- ShowIndexFor( playerid );
- }
- else {
- ShowPlayerDialog( playerid, EditSpeed, DIALOG_STYLE_INPUT,
- "Velocidade", "Os portões ao serem criados vem com uma velocidade padrão 4\nvocê pode modificar esta velocidade digitando um valor de 2 a 6", "Ok","Voltar");
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Velocidade 1 a 6");
- }
- }
- else {
- ShowPlayerDialog( playerid, EditSpeed, DIALOG_STYLE_INPUT,
- "Velocidade", "Os portões ao serem criados vem com uma velocidade padrão 4\nvocê pode modificar esta velocidade digitando um valor de 2 a 6", "Ok","Voltar");
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Use Apenas Numeros..");
- }
- }
- else ShowIndexFor( playerid );
- }
- case SaveGate: {
- if(response){
- new
- sT[ 129 ],
- p,
- gateid,
- IDgate
- ;
- gateid = GetPVarInt( playerid, "GateEdit2");
- p = GetPVarInt( playerid, "PastID");
- format( sT, sizeof( sT), P_GATES, p);
- switch(listitem){
- case 0: {
- GetPlayerObjectPos( playerid, gateid, Pos[0], Pos[1], Pos[2]);
- GetPlayerObjectRot( playerid, gateid, Rot[0], Rot[1], Rot[2]);
- DOF2_SetInt( sT, "Model", GateID[ playerid ]);
- DOF2_SetFloat( sT, "fPosX", Pos[0]);
- DOF2_SetFloat( sT, "fPosY", Pos[1]);
- DOF2_SetFloat( sT, "fPosZ", Pos[2]);
- DOF2_SetFloat( sT, "fPosRX", Rot[0]);
- DOF2_SetFloat( sT, "fPosRY", Rot[1]);
- DOF2_SetFloat( sT, "fPosRZ", Rot[2]);
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão Fechado salvo com sucesso!");
- ShowPlayerDialog( playerid, SaveGate, DIALOG_STYLE_LIST, "Salvando Edição", "Salvar Pos Fechado\nSalvar Pos Aberto\nTerminar Edição", "OK", "Voltar");
- DOF2_SaveFile();
- }
- case 1: {
- GetPlayerObjectPos( playerid, gateid, Pos[0], Pos[1], Pos[2]);
- GetPlayerObjectRot( playerid, gateid, Rot[0], Rot[1], Rot[2]);
- DOF2_SetInt( sT, "Model", GateID[ playerid ]);
- DOF2_SetFloat( sT, "aPosX", Pos[0]);
- DOF2_SetFloat( sT, "aPosY", Pos[1]);
- DOF2_SetFloat( sT, "aPosZ", Pos[2]);
- DOF2_SetFloat( sT, "aPosRX", Rot[0]);
- DOF2_SetFloat( sT, "aPosRY", Rot[1]);
- DOF2_SetFloat( sT, "aPosRZ", Rot[2]);
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão aberto salvo com sucesso!");
- ShowPlayerDialog( playerid, SaveGate, DIALOG_STYLE_LIST, "Salvando Edição", "Salvar Pos Fechado\nSalvar Pos Aberto\nTerminar Edição", "OK", "Voltar");
- DOF2_SaveFile();
- }
- case 2: {
- DestroyDynamicObject(DOF2_GetInt( sT, "Id2") );
- DestroyPlayerObject( playerid, gateid);
- gateid = CreatePlayerObject( playerid, DOF2_GetInt( sT, "Model"), DOF2_GetFloat( sT, "fPosX"), DOF2_GetFloat( sT, "fPosY"), DOF2_GetFloat( sT, "fPosZ"), DOF2_GetFloat( sT, "fPosRX"), DOF2_GetFloat( sT, "fPosRY"), DOF2_GetFloat( sT, "fPosRZ") );
- DOF2_SetInt( sT, "Id", gateid);
- DestroyPlayerObject( playerid, gateid);
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão salvo com sucesso!");
- IDgate = CreateDynamicObject(DOF2_GetInt( sT, "Model"), DOF2_GetFloat( sT, "fPosX"), DOF2_GetFloat( sT, "fPosY"), DOF2_GetFloat( sT, "fPosZ"), DOF2_GetFloat( sT, "fPosRX"), DOF2_GetFloat( sT, "fPosRY"), DOF2_GetFloat( sT, "fPosRZ"), -1, -1, -1, 200.0);
- DOF2_SetInt( sT, "Id2", IDgate);
- DOF2_SaveFile();
- DeletePVar( playerid, "PastID");
- DeletePVar( playerid, "GateEdit2");
- }
- }
- }
- else ShowIndexFor( playerid );
- }
- case DeletGate: {
- if(response){
- new
- id,
- portaoid
- ;
- portaoid = GetPVarInt( playerid, "GateEdit2");
- id = GetPVarInt( playerid, "PastID");
- format( gfile, sizeof( gfile ), P_GATES, id);
- if(DOF2_FileExists( gfile ) )
- {
- DOF2_SetInt( gfile , "SDono", 3);
- DOF2_SetString( gfile , "Dono", "Ninguem");
- //DOF2_SetInt( gfile , "Id2", INVALID_OBJECT_ID);
- proxgate--;
- }
- DestroyPlayerObject( playerid, portaoid);
- DestroyDynamicObject(DOF2_GetInt( gfile , "Id2") );
- SendClientMessage( playerid,-1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão deletado com sucesso!");
- DOF2_SaveFile();
- DeletePVar( playerid, "PastID");
- DeletePVar( playerid, "GateEdit2");
- getdate(_Dat[ 0 ], _Dat[ 1 ], _Dat[ 2 ]);
- format(_log, sizeof(_log), "%s Deletou o Portão ID: %d || Data: [%02d/%02d/%04d]\n", _GetSkName(playerid), id, _Dat[ 2 ], _Dat[ 1 ], _Dat[ 0 ]);
- PortaoLog(_log);
- }
- else ShowIndexFor( playerid );
- }
- }
- return true;
- }
- public OnPlayerEditObject( playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
- {
- if(objectid == GetPVarInt( playerid, "GateEdit2") )
- {
- new _obj;
- if(response == EDIT_RESPONSE_FINAL)
- {
- SendClientMessage( playerid,-1,"{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Cordenada Salva!");
- DestroyPlayerObject( playerid, GetPVarInt( playerid, "GateEdit2") );
- _obj = CreatePlayerObject( playerid, GateID[ playerid ], fX, fY, fZ, fRotX, fRotY, fRotZ);
- SetPVarInt( playerid, "GateEdit2", _obj);
- ShowIndexFor( playerid );
- }
- else if(response == EDIT_RESPONSE_CANCEL)
- {
- SendClientMessage( playerid,-1,"{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Edição Cancelada!");
- ShowIndexFor( playerid ),
- AtualizeObject( playerid );
- }
- }
- }
- forward PortaoLog(string[]); public PortaoLog(string[]){
- new
- entry[129],
- File:hFile
- ;
- format(entry, sizeof(entry), "%s\r\n", string);
- hFile = fopen("/Gates/Portoes.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- return 1;
- }
- //Stocks
- RessetPvars( playerid ){
- DeletePVar( playerid, "PastID");
- DeletePVar( playerid, "GateEdit2");
- Logado@_[ playerid ] = false;
- GateID[ playerid ] = -1;
- return true;
- }
- LoadGates(){
- for(new strpt[ 50 ], portaoid, p_@ = 0; p_@ < MAX_GATES; p_@++)
- {
- if(proxgate != MAX_GATES)
- {
- format( strpt, sizeof( strpt), P_GATES, p_@);
- if(DOF2_FileExists( strpt) )
- {
- if(DOF2_GetInt( strpt, "SDono") == 0)
- {
- portaoid = CreateDynamicObject(DOF2_GetInt( strpt, "Model"), DOF2_GetFloat( strpt, "fPosX"), DOF2_GetFloat( strpt, "fPosY"), DOF2_GetFloat( strpt, "fPosZ"), DOF2_GetFloat( strpt, "fPosRX"), DOF2_GetFloat( strpt, "fPosRY"), DOF2_GetFloat( strpt, "fPosRZ"), -1, -1, -1, 200.0);
- DOF2_SetInt( strpt, "Id2", portaoid);
- DOF2_SaveFile();
- proxgate++;
- }
- else
- {
- if(DOF2_GetInt( strpt, "SDono") == 1)
- {
- portaoid = CreateDynamicObject(DOF2_GetInt( strpt, "Model"), DOF2_GetFloat( strpt, "fPosX"), DOF2_GetFloat( strpt, "fPosY"), DOF2_GetFloat( strpt, "fPosZ"), DOF2_GetFloat( strpt, "fPosRX"), DOF2_GetFloat( strpt, "fPosRY"), DOF2_GetFloat( strpt, "fPosRZ"), -1, -1, -1, 200.0);
- DOF2_SetInt( strpt, "Id2", portaoid);
- DOF2_SaveFile();
- proxgate++;
- }
- else
- {
- DOF2_SetInt( strpt, "SDono", 3);
- DOF2_SetString( strpt, "Dono", "Ninguem");
- //DOF2_SetInt( strpt, "Id2", INVALID_OBJECT_ID);
- DOF2_SaveFile();
- proxgate++;
- }
- }
- }
- }
- }
- }
- unloadGates(){
- for(new p_@ = 0; p_@ < MAX_GATES; p_@++)
- {
- format( gfile, sizeof( gfile ), P_GATES, p_@);
- if( DOF2_FileExists( gfile ) )
- {
- if(!(DOF2_GetInt( gfile, "SDono") == 3) )
- {
- DestroyDynamicObject( DOF2_GetInt( gfile, "Id2") );
- }
- }
- }
- proxgate = 0;
- }
- PlayerCreateGate( playerid, modelo, Float:Xp, Float:Yp, Float:Zp, Int){
- new
- str1[ 60 ], str2[ 60 ], gatefile[ 60 ], gid
- ;
- if(!(modelo == 969 || modelo == 971 || modelo == 980) ) return
- SendClientMessage( playerid, -1, "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Use um modelo Padrão! | Modelos: 969, 971, 980");
- for(new sK = 0; sK < MAX_GATES; sK++){
- format( str1, sizeof( str1), P_GATES, sK);
- if(DOF2_FileExists( str1) ){
- if(DOF2_GetInt( str1, "SDono") == 3){
- DOF2_SetInt( str1, "Model", modelo);
- DOF2_SetFloat( str1, "fPosX", Xp);
- DOF2_SetFloat( str1, "fPosY", Yp);
- DOF2_SetFloat( str1, "fPosZ", Zp);
- DOF2_SetFloat( str1, "fPosRX", 0.0000);
- DOF2_SetFloat( str1, "fPosRY", 0.0000);
- DOF2_SetFloat( str1, "fPosRZ", 0.0000);
- DOF2_SetFloat( str1, "aPosX", Xp);
- DOF2_SetFloat( str1, "aPosY", Yp);
- DOF2_SetFloat( str1, "aPosZ", Zp);
- DOF2_SetFloat( str1, "aPosRX", 0.0000);
- DOF2_SetFloat( str1, "aPosRY", 0.0000);
- DOF2_SetFloat( str1, "aPosRZ", 0.0000);
- DOF2_SetInt( str1, "Speed", 4);
- DOF2_SetInt( str1, "IntID", Int);
- gid = CreatePlayerObject( playerid, modelo, Xp+5, Yp-5, Zp, 0.0000, 0.0000, 0.0000);
- DOF2_SetInt( str1, "Id", gid);
- DOF2_SetInt( str1, "Id2", INVALID_OBJECT_ID);
- DOF2_SetInt( str1, "SDono", 0);
- DOF2_SetString( str1, "Dono", "Ninguem");
- DOF2_SetString( str1, "CopyKey1", "Ninguem");
- DOF2_SetString( str1, "CopyKey2", "Ninguem");
- DOF2_SetString( str1, "CopyKey3", "Ninguem");
- SetPVarInt( playerid, "PastID", sK);
- SetPVarInt( playerid, "GateEdit2", DOF2_GetInt( str1, "Id") );
- GateID[ playerid ] = modelo;
- ShowIndexFor( playerid );
- format(stx_, sizeof(stx_), "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão criado. informações: Modelo iD: %d ID Portão: %d",modelo, sK);
- SendClientMessageToAll(-1, stx_);
- DOF2_SaveFile();
- getdate(_Dat[ 0 ], _Dat[ 1 ], _Dat[ 2 ]);
- format(_log, sizeof(_log), "%s Criou o Portão ID: %d, Modelo: %d || Data: [%02d/%02d/%04d]\n", _GetSkName(playerid), sK, modelo, _Dat[ 2 ], _Dat[ 1 ], _Dat[ 0 ]);
- PortaoLog(_log);
- return true;
- }
- }
- }
- if(proxgate >= MAX_GATES-1){
- format(stx_, sizeof(stx_), "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}O limite de %d portões foi atingido, não é possível criar mais.", MAX_GATES);
- SendClientMessage( playerid, -1, stx_);
- return true;
- }
- format( str2, sizeof( str2), P_GATES, proxgate);
- if(DOF2_FileExists( str2) ){
- proxgate++;
- }
- format(gatefile, sizeof(gatefile), P_GATES, proxgate);
- DOF2_CreateFile(gatefile);
- DOF2_SetInt(gatefile, "Model", modelo);
- DOF2_SetFloat(gatefile, "fPosX", Xp);
- DOF2_SetFloat(gatefile, "fPosY", Yp);
- DOF2_SetFloat(gatefile, "fPosZ", Zp);
- DOF2_SetFloat(gatefile, "fPosRX", 0.0000);
- DOF2_SetFloat(gatefile, "fPosRY", 0.0000);
- DOF2_SetFloat(gatefile, "fPosRZ", 0.0000);
- DOF2_SetFloat(gatefile, "aPosX", Xp);
- DOF2_SetFloat(gatefile, "aPosY", Yp);
- DOF2_SetFloat(gatefile, "aPosZ", Zp);
- DOF2_SetFloat(gatefile, "aPosRX", 0.0000);
- DOF2_SetFloat(gatefile, "aPosRY", 0.0000);
- DOF2_SetFloat(gatefile, "aPosRZ", 0.0000);
- DOF2_SetInt( gatefile, "Speed", 4);
- DOF2_SetInt(gatefile, "IntID", Int);
- gid = CreatePlayerObject( playerid, modelo, Xp+5, Yp-5, Zp, 0.0000, 0.0000, 0.0000);
- DOF2_SetInt(gatefile, "Id", gid);
- DOF2_SetInt( str1, "Id2", INVALID_OBJECT_ID);
- DOF2_SetInt(gatefile, "SDono", 0);
- DOF2_SetString(gatefile, "Dono", "Ninguem");
- DOF2_SetString(gatefile, "CopyKey1", "Ninguem");
- DOF2_SetString(gatefile, "CopyKey2", "Ninguem");
- DOF2_SetString(gatefile, "CopyKey3", "Ninguem");
- SetPVarInt( playerid, "PastID", proxgate);
- SetPVarInt( playerid, "GateEdit2", DOF2_GetInt(gatefile, "Id") );
- GateID[ playerid ] = modelo;
- ShowIndexFor( playerid );
- format(stx_, sizeof(stx_), "{FF0000}| {33AA33}SK Editor {FF0000}| {FFFFFF}Portão criado. informações: Modelo iD: %d ID Portão: %d", modelo, proxgate);
- SendClientMessage(playerid, -1, stx_);
- proxgate++;
- DOF2_SaveFile();
- getdate(_Dat[ 0 ], _Dat[ 1 ], _Dat[ 2 ]);
- format(_log, sizeof(_log), "| SK Editor | %s Criou o Portão ID: %d, Modelo: %d || Data: [%02d/%02d/%04d]\n", _GetSkName(playerid), proxgate, modelo, _Dat[ 2 ], _Dat[ 1 ], _Dat[ 0 ]);
- PortaoLog(_log);
- return true;
- }
- ShowIndexFor( playerid ) return ShowPlayerDialog( playerid, Index, DIALOG_STYLE_LIST, "{33AA33}..:: {FFFFFF}SK Gates Editor {33AA33}::..", "Modelo ID\nEditar Pos\nVelocidade Abrir/Fechar\nSalvar Portão\nDeletar Portão", "OK", "Cancelar");
- AtualizeObject( playerid ){
- new Objectid = GetPVarInt( playerid, "GateEdit2");
- GetPlayerObjectPos( playerid, Objectid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
- GetPlayerObjectRot( playerid, Objectid, Rot[ 0 ], Rot[ 1 ], Rot[ 2 ] );
- DestroyPlayerObject( playerid, Objectid );
- Objectid = CreatePlayerObject( playerid, GateID[ playerid ], Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], Rot[ 0 ], Rot[ 1 ], Rot[ 2 ] );
- }
- //DracoBlue
- IsNumeric(const string[]){
- for (new i = 0, j = strlen( string); i < j; i++){
- if ( string[i] > '9' || string[i] < '0') return 0;
- }
- return true;
- }
- StrToInt( string[] ){
- return strval( string );
- }
- _GetSkName( playerid ){
- new skName[ MAX_PLAYER_NAME ];
- GetPlayerName( playerid, skName, MAX_PLAYER_NAME);
- return skName;
- }
- IsPlayerOwner( playerid, gateid ){
- new
- _gfil[ 50 ];
- format( _gfil, sizeof( _gfil ), P_GATES, gateid );
- if( strcmp( DOF2_GetString( _gfil, "Dono"), _GetSkName( playerid ), false) == 0 || strcmp( DOF2_GetString( _gfil, "CopyKey1"), _GetSkName( playerid ), false) == 0 || strcmp( DOF2_GetString( _gfil, "CopyKey2"), _GetSkName( playerid ), false) == 0
- || strcmp( DOF2_GetString( _gfil, "CopyKey3"), _GetSkName( playerid ), false) == 0 || Logado@_[ playerid ] == true)
- {
- return true;
- }
- return 0;
- }
- LoadPlayerTexts( playerid ){
- #if defined TextDrawUser
- InfG[ 0 ][ playerid ] = CreatePlayerTextDraw( playerid, 119.000000, 135.000000, "~n~"); // Primeiro Background Red
- PlayerTextDrawAlignment( playerid, InfG[ 0 ][ playerid ], 2);
- PlayerTextDrawBackgroundColor( playerid, InfG[ 0 ][ playerid ], 255);
- PlayerTextDrawFont( playerid, InfG[ 0 ][ playerid ], 1);
- PlayerTextDrawLetterSize( playerid, InfG[ 0 ][ playerid ], 0.000000, 16.900014);
- PlayerTextDrawColor( playerid, InfG[ 0 ][ playerid ], -1);
- PlayerTextDrawSetOutline( playerid, InfG[ 0 ][ playerid ], 0);
- PlayerTextDrawSetProportional( playerid, InfG[ 0 ][ playerid ], 1);
- PlayerTextDrawSetShadow( playerid, InfG[ 0 ][ playerid ], 1);
- PlayerTextDrawUseBox( playerid, InfG[ 0 ][ playerid ], 1);
- PlayerTextDrawBoxColor( playerid, InfG[ 0 ][ playerid ], -16776961);
- PlayerTextDrawTextSize( playerid, InfG[ 0 ][ playerid ], 0.000000, 150.000000);
- InfG[ 1 ][ playerid ] = CreatePlayerTextDraw( playerid, 119.000000, 136.000000, "~n~"); //Background Black
- PlayerTextDrawAlignment( playerid, InfG[ 1 ][ playerid ], 2);
- PlayerTextDrawBackgroundColor( playerid, InfG[ 1 ][ playerid ], 255);
- PlayerTextDrawFont( playerid, InfG[ 1 ][ playerid ], 1);
- PlayerTextDrawLetterSize( playerid, InfG[ 1 ][ playerid ], 0.000000, 16.600013);
- PlayerTextDrawColor( playerid, InfG[ 1 ][ playerid ], -1);
- PlayerTextDrawSetOutline( playerid, InfG[ 1 ][ playerid ], 0);
- PlayerTextDrawSetProportional( playerid, InfG[ 1 ][ playerid ], 1);
- PlayerTextDrawSetShadow( playerid, InfG[ 1 ][ playerid ], 1);
- PlayerTextDrawUseBox( playerid, InfG[ 1 ][ playerid ], 1);
- PlayerTextDrawBoxColor( playerid, InfG[ 1 ][ playerid ], 255);
- PlayerTextDrawTextSize( playerid, InfG[ 1 ][ playerid ], 0.000000, 147.000000);
- InfG[ 2 ][ playerid ] = CreatePlayerTextDraw( playerid, 47.000000, 142.000000, "Informacoes~n~_~n~Dono:~n~_~n~Portao ID:~n~_~n~Copia Chave 1:~n~_~n~Copia Chave 2:~n~_~n~Copia Chave 3:");
- PlayerTextDrawBackgroundColor( playerid, InfG[ 2 ][ playerid ], 255);
- PlayerTextDrawFont( playerid, InfG[ 2 ][ playerid ], 1);
- PlayerTextDrawLetterSize( playerid, InfG[ 2 ][ playerid ], 0.200000, 1.400000);
- PlayerTextDrawColor( playerid, InfG[ 2 ][ playerid ], -1);
- PlayerTextDrawSetOutline( playerid, InfG[ 2 ][ playerid ], 0);
- PlayerTextDrawSetProportional( playerid, InfG[ 2 ][ playerid ], 1);
- PlayerTextDrawSetShadow( playerid, InfG[ 2 ][ playerid ], 1);
- InfG[ 3 ][ playerid ] = CreatePlayerTextDraw( playerid, 104.000000, 167.000000, "~n~");
- PlayerTextDrawBackgroundColor( playerid, InfG[ 3 ][ playerid ], 255);
- PlayerTextDrawFont( playerid, InfG[ 3 ][ playerid ], 1);
- PlayerTextDrawLetterSize( playerid, InfG[ 3 ][ playerid ], 0.200000, 1.400000);
- PlayerTextDrawColor( playerid, InfG[ 3 ][ playerid ], -1);
- PlayerTextDrawSetOutline( playerid, InfG[ 3 ][ playerid ], 0);
- PlayerTextDrawSetProportional( playerid, InfG[ 3 ][ playerid ], 1);
- PlayerTextDrawSetShadow( playerid, InfG[ 3 ][ playerid ], 1);
- InfG[ 4 ][ playerid ] = CreatePlayerTextDraw( playerid, 187.000000, 136.000000, "_"); //Segundo Background Red
- PlayerTextDrawAlignment( playerid, InfG[ 4 ][ playerid ], 2);
- PlayerTextDrawBackgroundColor( playerid, InfG[ 4 ][ playerid ], 255);
- PlayerTextDrawFont( playerid, InfG[ 4 ][ playerid ], 1);
- PlayerTextDrawLetterSize( playerid, InfG[ 4 ][ playerid ], 0.500000, 1.300000);
- PlayerTextDrawColor( playerid, InfG[ 4 ][ playerid ], -65281);
- PlayerTextDrawSetOutline( playerid, InfG[ 4 ][ playerid ], 0);
- PlayerTextDrawSetProportional( playerid, InfG[ 4 ][ playerid ], 1);
- PlayerTextDrawSetShadow( playerid, InfG[ 4 ][ playerid ], 1);
- PlayerTextDrawUseBox( playerid, InfG[ 4 ][ playerid ], 1);
- PlayerTextDrawBoxColor( playerid, InfG[ 4 ][ playerid ], -16776961);
- PlayerTextDrawTextSize( playerid, InfG[ 4 ][ playerid ], 0.000000, 12.000000);
- InfG[ 5 ][ playerid ] = CreatePlayerTextDraw( playerid, 181.000000, 136.000000, "X");
- PlayerTextDrawBackgroundColor( playerid, InfG[5][playerid], 255);
- PlayerTextDrawFont( playerid, InfG[5][playerid], 1);
- PlayerTextDrawLetterSize( playerid, InfG[5][playerid], 0.500000, 1.000000);
- PlayerTextDrawColor( playerid, InfG[5][playerid], -1);
- PlayerTextDrawSetOutline( playerid, InfG[5][playerid], 0);
- PlayerTextDrawSetProportional( playerid, InfG[5][playerid], 1);
- PlayerTextDrawSetShadow( playerid, InfG[5][playerid], 1);
- PlayerTextDrawSetSelectable( playerid, InfG[ 5 ][ playerid ], true);
- #endif
- return true;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement