Pawno | Eror 035

ТЕР.ОБОРОНА

Новичок
Автор темы
24
1
format(dialog, sizeof(dialog),

error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)
Помогите с ошибкой
 

ТЕР.ОБОРОНА

Новичок
Автор темы
24
1
Да, так запутаннее, но 100 процентов рабочий вариант

new PlayerName[25];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
player_info[playerid][NAME] = PlayerName;
1672772851146.png

Даже так
 

TastyBread123

Известный
611
290
Ну тогда пиздец, ошибка говорит о несовпадении типов переменных(тут должна быть строка, но прога думает, что ты суешь ей флоат/интеджер), попробуй поиграться с переменной dialog, это единственное, что тут осталось
 

ТЕР.ОБОРОНА

Новичок
Автор темы
24
1
Ну тогда пиздец, ошибка говорит о несовпадении типов переменных(тут должна быть строка, но прога думает, что ты суешь ей флоат/интеджер), попробуй поиграться с переменной dialog, это единственное, что тут осталось
Братанчик, снова сможешь помочь? Новая проблема нарисовалась.
P.S: Проблема тоже с регистрацией
 

ТЕР.ОБОРОНА

Новичок
Автор темы
24
1
1672850073777.png


присылай твой код, либо текст в консоли
Код:
#include <a_samp>
#include <a_mysql>
#include <fix>
#include <streamer>
#include <crashdetect>
#include <Pawn.CMD>
#include <Pawn.Regex>
#include <sscanf2>
#include <foreach>

#define     MYSQL_HOST "localhost"
#define     MYSQL_USER "root"
#define     MYSQL_PASS "root"
#define     MYSQL_BASE "bloody deatmatch"

#define SCM   SendClientMessage
#define SCMTA SendClientMessageToALL
#define SPD   ShowPlayerDialog

#define COLOR_WHITE 0xFFFFFFFF

main()
{
    print("\n----------------------------------");
    print("Bloody DeatMatch - NEW PROJECT");
    print("----------------------------------\n");
}

//----------------------  ПЕРЕМЕНАЯ  ---------------------
new MySQL:dbHandle;
//---------------------------------------------------------

enum player
{
    ID,
    NAME[MAX_PLAYER_NAME],
    PASSWORD[32],
}
new player_info[MAX_PLAYERS][player];

enum dialogs
{
     DLG_NONE,
     DLG_REG,
     DLG_LOG,
}

public OnGameModeInit()
{
    SetGameModeText("Blank Script");
    ConnectMySQL();
    return 1;
}

stock ConnectMySQL()
{
     dbHandle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_BASE);
     switch(mysql_errno())
     {
     case 0: print("Подключение к MySQL успешно");
     default: print("MySQL error!");
     }
     mysql_log(ERROR | WARNING);
     mysql_set_charset("cp1251");
}
public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
        GetPlayerName(playerid, player_info[playerid][NAME], MAX_PLAYER_NAME);
        static const fmt_query[] = "SELECT `id` FROM `users` WHERE `name` = '%s'";
        new query[sizeof(fmt_query)+(-2+MAX_PLAYER_NAME)];
        format(query, sizeof(query), fmt_query, player_info[playerid] [NAME]);
        mysql_tquery(dbHandle, query, "CheckRegistration", "i", playerid);
        return 1;
}

forward CheckRegistration(playerid);
public CheckRegistration(playerid)
{
        new rows;
        cache_get_row_count(rows);
        if(rows) ShowLogin(playerid);
        else ShowRegistration(playerid);
}

stock ShowLogin(playerid)
{
    SCM(playerid, COLOR_WHITE, "Игрок зарегистрирован");
}
stock ShowRegistration(playerid)
{
        new dialog[384+(-2+MAX_PLAYER_NAME)];
        format(dialog, sizeof(dialog),
                "{FFFFFF}Уважаемый {594de1}%s{FFFFFF}, мы рады видеть вас на {594de1}---- RolePlay{FFFFFF}\n\
                Аккаунт с таким ником не зарегистрирован\n\
                Для игры на сервере вы должны пройти регистрацию\n\n\
                Придумайте сложный пароль для вашего аккаунта и нажмите\"Далее\"\n\
                {e743e4}\t*Пароль должен быть от 8-ми до 36-ти символов\n\
                \t*Пароль должен состоять из цифр и латинских символов любого регистра",
        player_info[playerid][NAME]
        );
        SPD(playerid, DLG_REG, DIALOG_STYLE_INPUT, "{e743e4}Регистрация{FFFFFF}  Ввод пароля", dialog, "Далее", "Выход");
}
 

ТЕР.ОБОРОНА

Новичок
Автор темы
24
1
присылай твой код, либо текст в консоли

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

filterscripts = "" (string)

Server Plugins
--------------
Loading plugin: crashdetect
CrashDetect v4.18.1 is OK.
Loaded.
Loading plugin: mysql
>> plugin.mysql: R41-4 successfully loaded.
Loaded.
Loading plugin: pawncmd
Pawn.CMD plugin v3.1.4 by urShadow loaded
Loaded.
Loading plugin: pawnregex
Pawn.Regex plugin v1.1 by urShadow loaded
Loaded.
Loading plugin: sscanf


===============================

sscanf plugin loaded.

Version: 2.8.1

(c) 2012 Alex "Y_Less" Cole

===============================

Loaded.
Loading plugin: streamer


*** Streamer Plugin v2.9.3 by Incognito loaded ***

Loaded.
Loaded 6 plugins.


Started server on port: 7777, with maxplayers: 50 lanmode is OFF.


Filterscripts
---------------
Loaded 0 filterscripts.

Подключение к MySQL успешно

----------------------------------
Bloody DeatMatch - NEW PROJECT
----------------------------------

Number of vehicle models: 0

Код либо текст в консоли
Код:
#include <a_samp>
#include <a_mysql>
#include <fix>
#include <streamer>
#include <crashdetect>
#include <Pawn.CMD>
#include <Pawn.Regex>
#include <sscanf2>
#include <foreach>

#define     MYSQL_HOST "localhost"
#define     MYSQL_USER "root"
#define     MYSQL_PASS "root"
#define     MYSQL_BASE "bloody deatmatch"

#define SCM   SendClientMessage
#define SCMTA SendClientMessageToALL
#define SPD   ShowPlayerDialog

#define COLOR_WHITE 0xFFFFFFFF

main()
{
    print("\n----------------------------------");
    print("Bloody DeatMatch - NEW PROJECT");
    print("----------------------------------\n");
}

//----------------------  ПЕРЕМЕНАЯ  ---------------------
new MySQL:dbHandle;
//---------------------------------------------------------

enum player
{
    ID,
    NAME[MAX_PLAYER_NAME],
    PASSWORD[32],
}
new player_info[MAX_PLAYERS][player];

enum dialogs
{
     DLG_NONE,
     DLG_REG,
     DLG_LOG,
}

public OnGameModeInit()
{
    SetGameModeText("Blank Script");
    ConnectMySQL();
    return 1;
}

stock ConnectMySQL()
{
     dbHandle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_BASE);
     switch(mysql_errno())
     {
     case 0: print("Подключение к MySQL успешно");
     default: print("MySQL error!");
     }
     mysql_log(ERROR | WARNING);
     mysql_set_charset("cp1251");
}
public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
        GetPlayerName(playerid, player_info[playerid][NAME], MAX_PLAYER_NAME);
        static const fmt_query[] = "SELECT `id` FROM `users` WHERE `name` = '%s'";
        new query[sizeof(fmt_query)+(-2+MAX_PLAYER_NAME)];
        format(query, sizeof(query), fmt_query, player_info[playerid] [NAME]);
        mysql_tquery(dbHandle, query, "CheckRegistration", "i", playerid);
        return 1;
}

forward CheckRegistration(playerid);
public CheckRegistration(playerid)
{
        new rows;
        cache_get_row_count(rows);
        if(rows) ShowLogin(playerid);
        else ShowRegistration(playerid);
}

stock ShowLogin(playerid)
{
    SCM(playerid, COLOR_WHITE, "Игрок зарегистрирован");
}
stock ShowRegistration(playerid)
{
        new dialog[384+(-2+MAX_PLAYER_NAME)];
        format(dialog, sizeof(dialog),
                "{FFFFFF}Уважаемый {594de1}%s{FFFFFF}, мы рады видеть вас на {594de1}---- RolePlay{FFFFFF}\n\
                Аккаунт с таким ником не зарегистрирован\n\
                Для игры на сервере вы должны пройти регистрацию\n\n\
                Придумайте сложный пароль для вашего аккаунта и нажмите\"Далее\"\n\
                {e743e4}\t*Пароль должен быть от 8-ми до 36-ти символов\n\
                \t*Пароль должен состоять из цифр и латинских символов любого регистра",
        player_info[playerid][NAME]
        );
        SPD(playerid, DLG_REG, DIALOG_STYLE_INPUT, "{e743e4}Регистрация{FFFFFF}  Ввод пароля", dialog, "Далее", "Выход");
}
 

TastyBread123

Известный
611
290
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

filterscripts = "" (string)

Server Plugins
--------------
Loading plugin: crashdetect
CrashDetect v4.18.1 is OK.
Loaded.
Loading plugin: mysql
>> plugin.mysql: R41-4 successfully loaded.
Loaded.
Loading plugin: pawncmd
Pawn.CMD plugin v3.1.4 by urShadow loaded
Loaded.
Loading plugin: pawnregex
Pawn.Regex plugin v1.1 by urShadow loaded
Loaded.
Loading plugin: sscanf


===============================

sscanf plugin loaded.

Version: 2.8.1

(c) 2012 Alex "Y_Less" Cole

===============================

Loaded.
Loading plugin: streamer


*** Streamer Plugin v2.9.3 by Incognito loaded ***

Loaded.
Loaded 6 plugins.


Started server on port: 7777, with maxplayers: 50 lanmode is OFF.


Filterscripts
---------------
Loaded 0 filterscripts.

Подключение к MySQL успешно

----------------------------------
Bloody DeatMatch - NEW PROJECT
----------------------------------

Number of vehicle models: 0


Код:
#include <a_samp>
#include <a_mysql>
#include <fix>
#include <streamer>
#include <crashdetect>
#include <Pawn.CMD>
#include <Pawn.Regex>
#include <sscanf2>
#include <foreach>

#define     MYSQL_HOST "localhost"
#define     MYSQL_USER "root"
#define     MYSQL_PASS "root"
#define     MYSQL_BASE "bloody deatmatch"

#define SCM   SendClientMessage
#define SCMTA SendClientMessageToALL
#define SPD   ShowPlayerDialog

#define COLOR_WHITE 0xFFFFFFFF

main()
{
    print("\n----------------------------------");
    print("Bloody DeatMatch - NEW PROJECT");
    print("----------------------------------\n");
}

//----------------------  ПЕРЕМЕНАЯ  ---------------------
new MySQL:dbHandle;
//---------------------------------------------------------

enum player
{
    ID,
    NAME[MAX_PLAYER_NAME],
    PASSWORD[32],
}
new player_info[MAX_PLAYERS][player];

enum dialogs
{
     DLG_NONE,
     DLG_REG,
     DLG_LOG,
}

public OnGameModeInit()
{
    SetGameModeText("Blank Script");
    ConnectMySQL();
    return 1;
}

stock ConnectMySQL()
{
     dbHandle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_BASE);
     switch(mysql_errno())
     {
     case 0: print("Подключение к MySQL успешно");
     default: print("MySQL error!");
     }
     mysql_log(ERROR | WARNING);
     mysql_set_charset("cp1251");
}
public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
        GetPlayerName(playerid, player_info[playerid][NAME], MAX_PLAYER_NAME);
        static const fmt_query[] = "SELECT `id` FROM `users` WHERE `name` = '%s'";
        new query[sizeof(fmt_query)+(-2+MAX_PLAYER_NAME)];
        format(query, sizeof(query), fmt_query, player_info[playerid] [NAME]);
        mysql_tquery(dbHandle, query, "CheckRegistration", "i", playerid);
        return 1;
}

forward CheckRegistration(playerid);
public CheckRegistration(playerid)
{
        new rows;
        cache_get_row_count(rows);
        if(rows) ShowLogin(playerid);
        else ShowRegistration(playerid);
}

stock ShowLogin(playerid)
{
    SCM(playerid, COLOR_WHITE, "Игрок зарегистрирован");
}
stock ShowRegistration(playerid)
{
        new dialog[384+(-2+MAX_PLAYER_NAME)];
        format(dialog, sizeof(dialog),
                "{FFFFFF}Уважаемый {594de1}%s{FFFFFF}, мы рады видеть вас на {594de1}---- RolePlay{FFFFFF}\n\
                Аккаунт с таким ником не зарегистрирован\n\
                Для игры на сервере вы должны пройти регистрацию\n\n\
                Придумайте сложный пароль для вашего аккаунта и нажмите\"Далее\"\n\
                {e743e4}\t*Пароль должен быть от 8-ми до 36-ти символов\n\
                \t*Пароль должен состоять из цифр и латинских символов любого регистра",
        player_info[playerid][NAME]
        );
        SPD(playerid, DLG_REG, DIALOG_STYLE_INPUT, "{e743e4}Регистрация{FFFFFF}  Ввод пароля", dialog, "Далее", "Выход");
}
Попробуй перед SPD(playerid, DLG_REG, DIALOG_STYLE_INPUT, "{e743e4}Регистрация{FFFFFF} Ввод пароля", dialog, "Далее", "Выход"); поставить return
 

ТЕР.ОБОРОНА

Новичок
Автор темы
24
1
Посмотреть вложение 184429
Почему-то опять у тебя не работет, а у меня все отлично)
Так оно и без return работает, нету ошибок в павн, только окна регистрации тупо нет.

1672853282202.png
1672853242823.png


Попробуй перед SPD(playerid, DLG_REG, DIALOG_STYLE_INPUT, "{e743e4}Регистрация{FFFFFF} Ввод пароля", dialog, "Далее", "Выход"); поставить return
Код:
#include <a_samp>
#include <a_mysql>
#include <fix>
#include <streamer>
#include <crashdetect>
#include <Pawn.CMD>
#include <Pawn.Regex>
#include <sscanf2>
#include <foreach>
#include <mxINI>

#define     MYSQL_HOST "localhost"
#define     MYSQL_USER "root"
#define     MYSQL_PASS "root"
#define     MYSQL_BASE "bloody deatmatch"

#define SCM   SendClientMessage
#define SCMTA SendClientMessageToALL
#define SPD   ShowPlayerDialog

#define COLOR_WHITE 0xFFFFFFFF

main()
{
    print("\n----------------------------------");
    print("Bloody DeatMatch - NEW PROJECT");
    print("----------------------------------\n");
}

//----------------------  ÏÅÐÅÌÅÍÀß  ---------------------
new MySQL:dbHandle;
new Text:Register[4];
new Text:texttext[1];
new Text:BG[4];
new Text:nosl[2];

new Text:BGG[4];
new Text:texttext1[1];
new Text:Login[2];
new Text:oppg[1];

new bool:rega[MAX_PLAYERS];
new bool:male[MAX_PLAYERS];
new bool:login[MAX_PLAYERS];
new bool:logged[MAX_PLAYERS];

new SkinM[4] = { 1, 2, 3, 4 };
new SkinF[3] = { 169, 145, 140 };
//---------------------------------------------------------

enum pInfo
{
        pName[MAX_PLAYER_NAME],
        pPass[16],
        pMale,
        pSkin
}
new Player_Info[MAX_PLAYERS][pInfo];


enum dialogs
{
     DLG_NONE,
     DLG_REG,
     DLG_LOG,
}

public OnGameModeInit()
{
    Regisster();
    SetGameModeText("Blank Script");
    ConnectMySQL();
    return 1;
}

stock ConnectMySQL()
{
     dbHandle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_BASE);
     switch(mysql_errno())
     {
     case 0: print("Ïîäêëþ÷åíèå ê MySQL óñïåøíî");
     default: print("MySQL error!");
     }
     mysql_log(ERROR | WARNING);
     mysql_set_charset("cp1251");
}
public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    TogglePlayerSpectating(playerid, true);
    SelectTextDraw(playerid, 0xFF0000AA);
        new string[128];
        format(string, sizeof(string), "users/%s.ini", PI[playerid][pName]);
        if(!fexist(string))
        {
        rega[playerid] = false;
        male[playerid] = false;
        login[playerid] = false;
        // ????? ????? ??????
        GetPlayerName(playerid, PI[playerid][pName], 24);
        format(string, sizeof(string), "%s", PI[playerid][pName]);
        TextDrawSetString(Text:Register[0], string);
        TextDrawShowForPlayer(playerid, Register[0]);
        //
        for(new i; i != 4; i++) TextDrawShowForPlayer(playerid, Register[i]);
        for(new i; i != 4; i++) TextDrawShowForPlayer(playerid, BG[i]);
        for(new i; i != 2; i++) TextDrawShowForPlayer(playerid, nosl[i]);
        TextDrawShowForPlayer(playerid, texttext[0]);
        }
        else
        {
        // ???????????
        GetPlayerName(playerid, PI[playerid][pName], 24);
        format(string, sizeof(string), "%s", PI[playerid][pName]);
        TextDrawSetString(Text:Register[0], string);
        TextDrawShowForPlayer(playerid, Register[0]);
        //
        for(new i; i != 3; i++) TextDrawShowForPlayer(playerid, BGG[i]);
        TextDrawShowForPlayer(playerid, oppg[0]);
        for(new i; i != 2; i++) TextDrawShowForPlayer(playerid, Login[i]);
        TextDrawShowForPlayer(playerid, texttext[0]);
}

public OnPlayerConnect(playerid)
{
        return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    if(logged[playerid] == true) SavePlayer(playerid);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128];
        if(dialogid == 1)
        {
                {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "???? ??????", "??????? ?????????? ??????:", "????", "???????");
                if(strlen(inputtext) < 6 || strlen(inputtext) > 14) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "???? ??????", "??????? ?????????? ??????:", "????", "???????");
                for(new pass; pass < strlen(inputtext); pass++)
                switch(inputtext[pass])
                {
                    case '0'..'9': continue;
                    case 'A'..'Z': continue;
                    case 'a'..'z': continue;
                        default: return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "???? ??????", "??????? ?????????? ??????:", "????", "???????");
                }
                // ??????????
                format(string, sizeof(string), "users/%s.ini", PI[playerid][pName]);
                new iniFile = ini_createFile(string);
                if(iniFile < 0) ini_openFile(string);
                {
                    ini_setString(iniFile, "Password", inputtext);
                    ini_closeFile(iniFile);
                }
                // ----------
                format(string, sizeof(string), "%s", inputtext);
                TextDrawSetString(Text:nosl[1], string);
                rega[playerid] = true;
                }
                else
                {
                }
        }
        if(dialogid == 2)
        {
            if(response)
            {
                        new sex[11];
                        PI[playerid][pMale] = 1;
                        new randomM = random(sizeof(SkinM));
                PI[playerid][pSkin] = SkinM[randomM];
                        if(PI[playerid][pMale] == 1) sex = "MEN";
                        format(string, sizeof(string), "%s", sex);
                        TextDrawSetString(Text:nosl[0], string);
                        male[playerid] = true;
            }
            else
            {
                new sex[11];
                        PI[playerid][pMale] = 2;
                        new randomF = random(sizeof(SkinF));
                PI[playerid][pSkin] = SkinF[randomF];
                        if(PI[playerid][pMale] == 2) sex = "WOOMAN";
                        format(string, sizeof(string), "%s", sex);
                        TextDrawSetString(Text:nosl[0], string);
                        male[playerid] = true;
            }
        }
        if(dialogid == 3)
        {
            if(response)
            {
                if(rega[playerid] == false)
                        {
                            SendClientMessage(playerid, 0xFFFFFFAA, "?? ?? ????? ??????! ?? ?? ?????? ????????????.");
                            return 1;
                        }
                if(male[playerid] == false)
                        {
                            SendClientMessage(playerid, 0xFFFFFFAA, "?? ?? ??????? ??? ?????????! ?? ?? ?????? ????????????.");
                            return 1;
                        }
                        if(rega[playerid] == false && male[playerid] == false)
                        {
                                SendClientMessage(playerid, 0xFFFFFFAA, "?? ?? ????? / ??????? ??????");
                            return 1;
                        }
                        TogglePlayerSpectating(playerid, false);
                        for(new i; i != 4; i++) TextDrawHideForPlayer(playerid, Register[i]);
                        for(new i; i != 4; i++) TextDrawHideForPlayer(playerid, BG[i]);
                        for(new i; i != 2; i++) TextDrawHideForPlayer(playerid, nosl[i]);
                        TextDrawHideForPlayer(playerid, texttext[0]);
                        SpawnPlayer(playerid);
                        // ?????????? ??????
                        SetPlayerPos(playerid, 1154.3717,-1769.2594,16.5938);
                        SetPlayerFacingAngle(playerid, 0.6853);
                        SetCameraBehindPlayer(playerid);
                        SetPlayerVirtualWorld(playerid, 0);
                        SetPlayerInterior(playerid, 0);
                        // -----------------
                        SetPlayerSkin(playerid, PI[playerid][pSkin]);
                        // -----------------
                        SavePlayer(playerid);
                        CancelSelectTextDraw(playerid);
                        logged[playerid] = true;
            }
                else { }
        }
        if(dialogid == 4)
        {
            if(response)
{
            if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "???????????", "??????? ?????????? ?????? ?? ????????:", "????", "???????");
            format(string, sizeof(string), "users/%s.ini", PI[playerid][pName]);
            new iniFile = ini_openFile(string);
            ini_getString(iniFile, "Password", string);
            if(!strcmp(inputtext, string, true))
            {
                ini_getString(iniFile, "Password", string);
                ini_getInteger(iniFile, "Male", PI[playerid][pMale]);
                ini_getInteger(iniFile, "Skin", PI[playerid][pSkin]);
                ini_closeFile(iniFile);
                        format(string, sizeof(string), "%s", inputtext);
                        TextDrawSetString(Text:oppg[0], string);
                        SendClientMessage(playerid, 0xFFCC00AA, "?? ????? ????? ??????! ??????? ?? ?????? SPAWN, ????? ????????????!");
                        login[playerid] = true;
            }
            else
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "?? ????? ??????? ??????.");
                ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "???????????", "??????? ?????????? ?????? ?? ????????:", "????", "???????");
            }
            }
            else { }
        }
        if(dialogid == 5)
        {
            if(login[playerid] == false)
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "?? ?? ????? ?????? ?? ????????! ?? ?? ?????? ????????????!");
                return 1;
            }
            TogglePlayerSpectating(playerid, false);
            TextDrawHideForPlayer(playerid, Register[0]);
                for(new i; i != 2; i++) TextDrawHideForPlayer(playerid, BGG[i]);
                TextDrawHideForPlayer(playerid, oppg[0]);
                for(new i; i != 2; i++) TextDrawHideForPlayer(playerid, Login[i]);
                TextDrawHideForPlayer(playerid, texttext[0]);
                SpawnPlayer(playerid);
                // ?????????? ??????
                SetPlayerPos(playerid, 1154.3717,-1769.2594,16.5938);
                SetPlayerFacingAngle(playerid, 0.6853);
                SetCameraBehindPlayer(playerid);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerInterior(playerid, 0);
                // -----------------
                SetPlayerSkin(playerid, PI[playerid][pSkin]);
                // -----------------
                CancelSelectTextDraw(playerid);
                logged[playerid] = true;
        }
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
public OnPlayerClickTextDraw(playerid, Text: clickedid)
{
  if(clickedid == Register[1])
        {
            ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "???? ??????", "??????? ?????????? ??????:", "????", "???????");
        }
        if(clickedid == Register[2])
        {
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "????? ????", "??????????, ???????? ??????? ??? ?????????:", "???????", "???????");
        }
        if(clickedid == Register[3])
        {
                ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "SPAWN", "?? ??????? ?????????????", "??", "???");
        }
        if(clickedid == Login[0])
        {
                ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "???????????", "??????? ?????????? ?????? ?? ????????:", "????", "???????");
        }
        if(clickedid == Login[1])
        {
                ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "SPAWN", "?? ??????? ?????????????", "??", "???");
        }
        
}

stock Regisster()
{
        BG[0] = TextDrawCreate(410.666625, 149.174072, "usebox");
        TextDrawLetterSize(BG[0], 0.000000, 17.428190);
        TextDrawTextSize(BG[0], 230.000015, 0.000000);
        TextDrawAlignment(BG[0], 1);
        TextDrawColor(BG[0], 0);
        TextDrawUseBox(BG[0], true);
        TextDrawBoxColor(BG[0], 1721355434);
        TextDrawSetShadow(BG[0], 0);
        TextDrawSetOutline(BG[0], 0);
        TextDrawFont(BG[0], 0);

        texttext[0] = TextDrawCreate(254.666656, 146.844421, "Bloody.pwn Role Play");
        TextDrawLetterSize(texttext[0], 0.395333, 1.770074);
        TextDrawAlignment(texttext[0], 1);
        TextDrawColor(texttext[0], -1);
        TextDrawSetShadow(texttext[0], 0);
        TextDrawSetOutline(texttext[0], 1);
        TextDrawBackgroundColor(texttext[0], 51);
        TextDrawFont(texttext[0], 1);
        TextDrawSetProportional(texttext[0], 1);

        BG[1] = TextDrawCreate(410.666656, 166.596282, "usebox");
        TextDrawLetterSize(BG[1], 0.000000, 0.697327);
        TextDrawTextSize(BG[1], 230.000000, 0.000000);
        TextDrawAlignment(BG[1], 1);
        TextDrawColor(BG[1], 0);
        TextDrawUseBox(BG[1], true);
        TextDrawBoxColor(BG[1], 102);
        TextDrawSetShadow(BG[1], 0);
        TextDrawSetOutline(BG[1], 0);
        TextDrawFont(BG[1], 0);

        Register[0] = TextDrawCreate(300.666564, 164.266601, "NAME");
        TextDrawLetterSize(Register[0], 0.225999, 1.102222);
        TextDrawAlignment(Register[0], 1);
        TextDrawColor(Register[0], -1);
        TextDrawSetShadow(Register[0], 0);
        TextDrawSetOutline(Register[0], 1);
        TextDrawBackgroundColor(Register[0], 51);
        TextDrawFont(Register[0], 2);
        TextDrawSetProportional(Register[0], 1);

        Register[1] = TextDrawCreate(234.666549, 178.785247, "PASSWORD:"); // REGISTER[1] - ??????
        TextDrawLetterSize(Register[1], 0.272333, 1.508740);
        TextDrawTextSize(Register[1], 409.000152, 8.711111);
        TextDrawAlignment(Register[1], 1);
        TextDrawColor(Register[1], -1);
        TextDrawUseBox(Register[1], true);
        TextDrawBoxColor(Register[1], 572662303);
        TextDrawSetShadow(Register[1], 0);
        TextDrawSetOutline(Register[1], 1);
        TextDrawBackgroundColor(Register[1], 51);
        TextDrawFont(Register[1], 2);
        TextDrawSetProportional(Register[1], 1);
        TextDrawSetSelectable(Register[1], true);

        BG[2] = TextDrawCreate(410.666656, 183.188888, "usebox");
        TextDrawLetterSize(BG[2], 0.000000, 0.789505);
        TextDrawTextSize(BG[2], 300.666656, 0.000000);
        TextDrawAlignment(BG[2], 1);
        TextDrawColor(BG[2], 0);
        TextDrawUseBox(BG[2], true);
        TextDrawBoxColor(BG[2], 102);
        TextDrawSetShadow(BG[2], 0);
        TextDrawSetOutline(BG[2], 0);
        TextDrawFont(BG[2], 0);

        nosl[1] = TextDrawCreate(335.666748, 179.614791, "_");
        TextDrawLetterSize(nosl[1], 0.192333, 1.276444);
        TextDrawAlignment(nosl[1], 1);
        TextDrawColor(nosl[1], -1);
        TextDrawSetShadow(nosl[1], 0);
        TextDrawSetOutline(nosl[1], 1);
        TextDrawBackgroundColor(nosl[1], 51);
        TextDrawFont(nosl[1], 2);
        TextDrawSetProportional(nosl[1], 1);

        Register[2] = TextDrawCreate(234.999984, 202.014801, "MALE:");
        TextDrawLetterSize(Register[2], 0.321332, 1.409185);
        TextDrawTextSize(Register[2], 408.000030, 15.074075);
        TextDrawAlignment(Register[2], 1);
        TextDrawColor(Register[2], -1);
        TextDrawUseBox(Register[2], true);
        TextDrawBoxColor(Register[2], 572662303);
        TextDrawSetShadow(Register[2], 0);
        TextDrawSetOutline(Register[2], 1);
        TextDrawBackgroundColor(Register[2], 51);
        TextDrawFont(Register[2], 2);
        TextDrawSetProportional(Register[2], 1);
        TextDrawSetSelectable(Register[2], true);

        BG[3] = TextDrawCreate(410.666656, 206.833343, "usebox");
        TextDrawLetterSize(BG[3], 0.000000, 0.789505);
        TextDrawTextSize(BG[3], 275.666656, 0.000000);
        TextDrawAlignment(BG[3], 1);
        TextDrawColor(BG[3], 0);
        TextDrawUseBox(BG[3], true);
        TextDrawBoxColor(BG[3], 102);
        TextDrawSetShadow(BG[3], 0);
        TextDrawSetOutline(BG[3], 0);
        TextDrawFont(BG[3], 0);

        nosl[0] = TextDrawCreate(319.000000, 204.918502, "_");
        TextDrawLetterSize(nosl[0], 0.216666, 1.122963);
        TextDrawAlignment(nosl[0], 1);
        TextDrawColor(nosl[0], -1);
        TextDrawSetShadow(nosl[0], 0);
        TextDrawSetOutline(nosl[0], 1);
        TextDrawBackgroundColor(nosl[0], 51);
        TextDrawFont(nosl[0], 2);
        TextDrawSetProportional(nosl[0], 1);

        Register[3] = TextDrawCreate(289.999969, 249.303771, "SPAWN");
        TextDrawLetterSize(Register[3], 0.449999, 1.600000);
        TextDrawTextSize(Register[3], 347.333282, 15.244444);
        TextDrawAlignment(Register[3], 1);
        TextDrawColor(Register[3], -1);
        TextDrawUseBox(Register[3], true);
        TextDrawBoxColor(Register[3], 572662303);
        TextDrawSetShadow(Register[3], 0);
        TextDrawSetOutline(Register[3], 1);
        TextDrawBackgroundColor(Register[3], 51);
        TextDrawFont(Register[3], 1);
        TextDrawSetProportional(Register[3], 1);
        TextDrawSetSelectable(Register[3], true);
        // ??????????? -------------------------------------------------------------
        BGG[0] = TextDrawCreate(410.666625, 149.174072, "usebox");
        TextDrawLetterSize(BGG[0], 0.000000, 17.428190);
        TextDrawTextSize(BGG[0], 230.000015, 0.000000);
        TextDrawAlignment(BGG[0], 1);
        TextDrawColor(BGG[0], 0);
        TextDrawUseBox(BGG[0], true);
        TextDrawBoxColor(BGG[0], 1721355434);
        TextDrawSetShadow(BGG[0], 0);
        TextDrawSetOutline(BGG[0], 0);
        TextDrawFont(BGG[0], 0);

        texttext1[0] = TextDrawCreate(254.666656, 146.844421, "new.pwn Role Play");
        TextDrawLetterSize(texttext1[0], 0.395332, 1.770074);
        TextDrawAlignment(texttext1[0], 1);
        TextDrawColor(texttext1[0], -1);
        TextDrawSetShadow(texttext1[0], 0);
        TextDrawSetOutline(texttext1[0], 1);
        TextDrawBackgroundColor(texttext1[0], 51);
        TextDrawFont(texttext1[0], 1);
        TextDrawSetProportional(texttext1[0], 1);

        BGG[1] = TextDrawCreate(410.666656, 166.596282, "usebox");
        TextDrawLetterSize(BGG[1], 0.000000, 0.697327);
        TextDrawTextSize(BGG[1], 230.000000, 0.000000);
        TextDrawAlignment(BGG[1], 1);
        TextDrawColor(BGG[1], 0);
        TextDrawUseBox(BGG[1], true);
        TextDrawBoxColor(BGG[1], 102);
        TextDrawSetShadow(BGG[1], 0);
        TextDrawSetOutline(BGG[1], 0);
        TextDrawFont(BGG[1], 0);

        Login[0] = TextDrawCreate(234.666549, 178.785247, "PASSWORD:");
        TextDrawLetterSize(Login[0], 0.272332, 1.508739);
        TextDrawTextSize(Login[0], 409.000152, 8.711111);
        TextDrawAlignment(Login[0], 1);
        TextDrawColor(Login[0], -1);
        TextDrawUseBox(Login[0], true);
        TextDrawBoxColor(Login[0], 572662303);
        TextDrawSetShadow(Login[0], 0);
        TextDrawSetOutline(Login[0], 1);
        TextDrawBackgroundColor(Login[0], 51);
        TextDrawFont(Login[0], 2);
        TextDrawSetProportional(Login[0], 1);
        TextDrawSetSelectable(Login[0], true);

        oppg[0] = TextDrawCreate(335.666748, 179.614791, "_");
        TextDrawLetterSize(oppg[0], 0.192332, 1.276443);
        TextDrawAlignment(oppg[0], 1);
        TextDrawColor(oppg[0], -1);
        TextDrawSetShadow(oppg[0], 0);
        TextDrawSetOutline(oppg[0], 1);
        TextDrawBackgroundColor(oppg[0], 51);
        TextDrawFont(oppg[0], 2);
        TextDrawSetProportional(oppg[0], 1);

        Login[1] = TextDrawCreate(289.999969, 249.303771, "SPAWN");
        TextDrawLetterSize(Login[1], 0.449999, 1.600000);
        TextDrawTextSize(Login[1], 347.333282, 15.244444);
        TextDrawAlignment(Login[1], 1);
        TextDrawColor(Login[1], -1);
        TextDrawUseBox(Login[1], true);
        TextDrawBoxColor(Login[1], 572662303);
        TextDrawSetShadow(Login[1], 0);
        TextDrawSetOutline(Login[1], 1);
        TextDrawBackgroundColor(Login[1], 51);
        TextDrawFont(Login[1], 1);
        TextDrawSetProportional(Login[1], 1);
        TextDrawSetSelectable(Login[1], true);
}

stock SavePlayer(playerid)
{
        new string[50];
    format(string, sizeof(string), "users/%s.ini", PI[playerid][pName]);
    new iniFile = ini_openFile(string);
    if(!iniFile)
    {
        ini_setInteger(iniFile, "Male", PI[playerid][pMale]);
        ini_setInteger(iniFile, "Skin", PI[playerid][pSkin]);
        ini_closeFile(iniFile);
    }
}
Кароче смотри я переделал систему, написал на MxINI, и теперь нужно ошибки фиксануть

1672856878292.png
 
Последнее редактирование:

TastyBread123

Известный
611
290
Так оно и без return работает, нету ошибок в павн, только окна регистрации тупо нет.

Посмотреть вложение 184431Посмотреть вложение 184430


Код:
#include <a_samp>
#include <a_mysql>
#include <fix>
#include <streamer>
#include <crashdetect>
#include <Pawn.CMD>
#include <Pawn.Regex>
#include <sscanf2>
#include <foreach>
#include <mxINI>

#define     MYSQL_HOST "localhost"
#define     MYSQL_USER "root"
#define     MYSQL_PASS "root"
#define     MYSQL_BASE "bloody deatmatch"

#define SCM   SendClientMessage
#define SCMTA SendClientMessageToALL
#define SPD   ShowPlayerDialog

#define COLOR_WHITE 0xFFFFFFFF

main()
{
    print("\n----------------------------------");
    print("Bloody DeatMatch - NEW PROJECT");
    print("----------------------------------\n");
}

//----------------------  ÏÅÐÅÌÅÍÀß  ---------------------
new MySQL:dbHandle;
new Text:Register[4];
new Text:texttext[1];
new Text:BG[4];
new Text:nosl[2];

new Text:BGG[4];
new Text:texttext1[1];
new Text:Login[2];
new Text:oppg[1];

new bool:rega[MAX_PLAYERS];
new bool:male[MAX_PLAYERS];
new bool:login[MAX_PLAYERS];
new bool:logged[MAX_PLAYERS];

new SkinM[4] = { 1, 2, 3, 4 };
new SkinF[3] = { 169, 145, 140 };
//---------------------------------------------------------

enum pInfo
{
        pName[MAX_PLAYER_NAME],
        pPass[16],
        pMale,
        pSkin
}
new Player_Info[MAX_PLAYERS][pInfo];


enum dialogs
{
     DLG_NONE,
     DLG_REG,
     DLG_LOG,
}

public OnGameModeInit()
{
    Regisster();
    SetGameModeText("Blank Script");
    ConnectMySQL();
    return 1;
}

stock ConnectMySQL()
{
     dbHandle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_BASE);
     switch(mysql_errno())
     {
     case 0: print("Ïîäêëþ÷åíèå ê MySQL óñïåøíî");
     default: print("MySQL error!");
     }
     mysql_log(ERROR | WARNING);
     mysql_set_charset("cp1251");
}
public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    TogglePlayerSpectating(playerid, true);
    SelectTextDraw(playerid, 0xFF0000AA);
        new string[128];
        format(string, sizeof(string), "users/%s.ini", PI[playerid][pName]);
        if(!fexist(string))
        {
        rega[playerid] = false;
        male[playerid] = false;
        login[playerid] = false;
        // ????? ????? ??????
        GetPlayerName(playerid, PI[playerid][pName], 24);
        format(string, sizeof(string), "%s", PI[playerid][pName]);
        TextDrawSetString(Text:Register[0], string);
        TextDrawShowForPlayer(playerid, Register[0]);
        //
        for(new i; i != 4; i++) TextDrawShowForPlayer(playerid, Register[i]);
        for(new i; i != 4; i++) TextDrawShowForPlayer(playerid, BG[i]);
        for(new i; i != 2; i++) TextDrawShowForPlayer(playerid, nosl[i]);
        TextDrawShowForPlayer(playerid, texttext[0]);
        }
        else
        {
        // ???????????
        GetPlayerName(playerid, PI[playerid][pName], 24);
        format(string, sizeof(string), "%s", PI[playerid][pName]);
        TextDrawSetString(Text:Register[0], string);
        TextDrawShowForPlayer(playerid, Register[0]);
        //
        for(new i; i != 3; i++) TextDrawShowForPlayer(playerid, BGG[i]);
        TextDrawShowForPlayer(playerid, oppg[0]);
        for(new i; i != 2; i++) TextDrawShowForPlayer(playerid, Login[i]);
        TextDrawShowForPlayer(playerid, texttext[0]);
}

public OnPlayerConnect(playerid)
{
        return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    if(logged[playerid] == true) SavePlayer(playerid);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128];
        if(dialogid == 1)
        {
                {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "???? ??????", "??????? ?????????? ??????:", "????", "???????");
                if(strlen(inputtext) < 6 || strlen(inputtext) > 14) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "???? ??????", "??????? ?????????? ??????:", "????", "???????");
                for(new pass; pass < strlen(inputtext); pass++)
                switch(inputtext[pass])
                {
                    case '0'..'9': continue;
                    case 'A'..'Z': continue;
                    case 'a'..'z': continue;
                        default: return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "???? ??????", "??????? ?????????? ??????:", "????", "???????");
                }
                // ??????????
                format(string, sizeof(string), "users/%s.ini", PI[playerid][pName]);
                new iniFile = ini_createFile(string);
                if(iniFile < 0) ini_openFile(string);
                {
                    ini_setString(iniFile, "Password", inputtext);
                    ini_closeFile(iniFile);
                }
                // ----------
                format(string, sizeof(string), "%s", inputtext);
                TextDrawSetString(Text:nosl[1], string);
                rega[playerid] = true;
                }
                else
                {
                }
        }
        if(dialogid == 2)
        {
            if(response)
            {
                        new sex[11];
                        PI[playerid][pMale] = 1;
                        new randomM = random(sizeof(SkinM));
                PI[playerid][pSkin] = SkinM[randomM];
                        if(PI[playerid][pMale] == 1) sex = "MEN";
                        format(string, sizeof(string), "%s", sex);
                        TextDrawSetString(Text:nosl[0], string);
                        male[playerid] = true;
            }
            else
            {
                new sex[11];
                        PI[playerid][pMale] = 2;
                        new randomF = random(sizeof(SkinF));
                PI[playerid][pSkin] = SkinF[randomF];
                        if(PI[playerid][pMale] == 2) sex = "WOOMAN";
                        format(string, sizeof(string), "%s", sex);
                        TextDrawSetString(Text:nosl[0], string);
                        male[playerid] = true;
            }
        }
        if(dialogid == 3)
        {
            if(response)
            {
                if(rega[playerid] == false)
                        {
                            SendClientMessage(playerid, 0xFFFFFFAA, "?? ?? ????? ??????! ?? ?? ?????? ????????????.");
                            return 1;
                        }
                if(male[playerid] == false)
                        {
                            SendClientMessage(playerid, 0xFFFFFFAA, "?? ?? ??????? ??? ?????????! ?? ?? ?????? ????????????.");
                            return 1;
                        }
                        if(rega[playerid] == false && male[playerid] == false)
                        {
                                SendClientMessage(playerid, 0xFFFFFFAA, "?? ?? ????? / ??????? ??????");
                            return 1;
                        }
                        TogglePlayerSpectating(playerid, false);
                        for(new i; i != 4; i++) TextDrawHideForPlayer(playerid, Register[i]);
                        for(new i; i != 4; i++) TextDrawHideForPlayer(playerid, BG[i]);
                        for(new i; i != 2; i++) TextDrawHideForPlayer(playerid, nosl[i]);
                        TextDrawHideForPlayer(playerid, texttext[0]);
                        SpawnPlayer(playerid);
                        // ?????????? ??????
                        SetPlayerPos(playerid, 1154.3717,-1769.2594,16.5938);
                        SetPlayerFacingAngle(playerid, 0.6853);
                        SetCameraBehindPlayer(playerid);
                        SetPlayerVirtualWorld(playerid, 0);
                        SetPlayerInterior(playerid, 0);
                        // -----------------
                        SetPlayerSkin(playerid, PI[playerid][pSkin]);
                        // -----------------
                        SavePlayer(playerid);
                        CancelSelectTextDraw(playerid);
                        logged[playerid] = true;
            }
                else { }
        }
        if(dialogid == 4)
        {
            if(response)
{
            if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "???????????", "??????? ?????????? ?????? ?? ????????:", "????", "???????");
            format(string, sizeof(string), "users/%s.ini", PI[playerid][pName]);
            new iniFile = ini_openFile(string);
            ini_getString(iniFile, "Password", string);
            if(!strcmp(inputtext, string, true))
            {
                ini_getString(iniFile, "Password", string);
                ini_getInteger(iniFile, "Male", PI[playerid][pMale]);
                ini_getInteger(iniFile, "Skin", PI[playerid][pSkin]);
                ini_closeFile(iniFile);
                        format(string, sizeof(string), "%s", inputtext);
                        TextDrawSetString(Text:oppg[0], string);
                        SendClientMessage(playerid, 0xFFCC00AA, "?? ????? ????? ??????! ??????? ?? ?????? SPAWN, ????? ????????????!");
                        login[playerid] = true;
            }
            else
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "?? ????? ??????? ??????.");
                ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "???????????", "??????? ?????????? ?????? ?? ????????:", "????", "???????");
            }
            }
            else { }
        }
        if(dialogid == 5)
        {
            if(login[playerid] == false)
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "?? ?? ????? ?????? ?? ????????! ?? ?? ?????? ????????????!");
                return 1;
            }
            TogglePlayerSpectating(playerid, false);
            TextDrawHideForPlayer(playerid, Register[0]);
                for(new i; i != 2; i++) TextDrawHideForPlayer(playerid, BGG[i]);
                TextDrawHideForPlayer(playerid, oppg[0]);
                for(new i; i != 2; i++) TextDrawHideForPlayer(playerid, Login[i]);
                TextDrawHideForPlayer(playerid, texttext[0]);
                SpawnPlayer(playerid);
                // ?????????? ??????
                SetPlayerPos(playerid, 1154.3717,-1769.2594,16.5938);
                SetPlayerFacingAngle(playerid, 0.6853);
                SetCameraBehindPlayer(playerid);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerInterior(playerid, 0);
                // -----------------
                SetPlayerSkin(playerid, PI[playerid][pSkin]);
                // -----------------
                CancelSelectTextDraw(playerid);
                logged[playerid] = true;
        }
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
public OnPlayerClickTextDraw(playerid, Text: clickedid)
{
  if(clickedid == Register[1])
        {
            ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "???? ??????", "??????? ?????????? ??????:", "????", "???????");
        }
        if(clickedid == Register[2])
        {
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "????? ????", "??????????, ???????? ??????? ??? ?????????:", "???????", "???????");
        }
        if(clickedid == Register[3])
        {
                ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "SPAWN", "?? ??????? ?????????????", "??", "???");
        }
        if(clickedid == Login[0])
        {
                ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "???????????", "??????? ?????????? ?????? ?? ????????:", "????", "???????");
        }
        if(clickedid == Login[1])
        {
                ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "SPAWN", "?? ??????? ?????????????", "??", "???");
        }
     
}

stock Regisster()
{
        BG[0] = TextDrawCreate(410.666625, 149.174072, "usebox");
        TextDrawLetterSize(BG[0], 0.000000, 17.428190);
        TextDrawTextSize(BG[0], 230.000015, 0.000000);
        TextDrawAlignment(BG[0], 1);
        TextDrawColor(BG[0], 0);
        TextDrawUseBox(BG[0], true);
        TextDrawBoxColor(BG[0], 1721355434);
        TextDrawSetShadow(BG[0], 0);
        TextDrawSetOutline(BG[0], 0);
        TextDrawFont(BG[0], 0);

        texttext[0] = TextDrawCreate(254.666656, 146.844421, "Bloody.pwn Role Play");
        TextDrawLetterSize(texttext[0], 0.395333, 1.770074);
        TextDrawAlignment(texttext[0], 1);
        TextDrawColor(texttext[0], -1);
        TextDrawSetShadow(texttext[0], 0);
        TextDrawSetOutline(texttext[0], 1);
        TextDrawBackgroundColor(texttext[0], 51);
        TextDrawFont(texttext[0], 1);
        TextDrawSetProportional(texttext[0], 1);

        BG[1] = TextDrawCreate(410.666656, 166.596282, "usebox");
        TextDrawLetterSize(BG[1], 0.000000, 0.697327);
        TextDrawTextSize(BG[1], 230.000000, 0.000000);
        TextDrawAlignment(BG[1], 1);
        TextDrawColor(BG[1], 0);
        TextDrawUseBox(BG[1], true);
        TextDrawBoxColor(BG[1], 102);
        TextDrawSetShadow(BG[1], 0);
        TextDrawSetOutline(BG[1], 0);
        TextDrawFont(BG[1], 0);

        Register[0] = TextDrawCreate(300.666564, 164.266601, "NAME");
        TextDrawLetterSize(Register[0], 0.225999, 1.102222);
        TextDrawAlignment(Register[0], 1);
        TextDrawColor(Register[0], -1);
        TextDrawSetShadow(Register[0], 0);
        TextDrawSetOutline(Register[0], 1);
        TextDrawBackgroundColor(Register[0], 51);
        TextDrawFont(Register[0], 2);
        TextDrawSetProportional(Register[0], 1);

        Register[1] = TextDrawCreate(234.666549, 178.785247, "PASSWORD:"); // REGISTER[1] - ??????
        TextDrawLetterSize(Register[1], 0.272333, 1.508740);
        TextDrawTextSize(Register[1], 409.000152, 8.711111);
        TextDrawAlignment(Register[1], 1);
        TextDrawColor(Register[1], -1);
        TextDrawUseBox(Register[1], true);
        TextDrawBoxColor(Register[1], 572662303);
        TextDrawSetShadow(Register[1], 0);
        TextDrawSetOutline(Register[1], 1);
        TextDrawBackgroundColor(Register[1], 51);
        TextDrawFont(Register[1], 2);
        TextDrawSetProportional(Register[1], 1);
        TextDrawSetSelectable(Register[1], true);

        BG[2] = TextDrawCreate(410.666656, 183.188888, "usebox");
        TextDrawLetterSize(BG[2], 0.000000, 0.789505);
        TextDrawTextSize(BG[2], 300.666656, 0.000000);
        TextDrawAlignment(BG[2], 1);
        TextDrawColor(BG[2], 0);
        TextDrawUseBox(BG[2], true);
        TextDrawBoxColor(BG[2], 102);
        TextDrawSetShadow(BG[2], 0);
        TextDrawSetOutline(BG[2], 0);
        TextDrawFont(BG[2], 0);

        nosl[1] = TextDrawCreate(335.666748, 179.614791, "_");
        TextDrawLetterSize(nosl[1], 0.192333, 1.276444);
        TextDrawAlignment(nosl[1], 1);
        TextDrawColor(nosl[1], -1);
        TextDrawSetShadow(nosl[1], 0);
        TextDrawSetOutline(nosl[1], 1);
        TextDrawBackgroundColor(nosl[1], 51);
        TextDrawFont(nosl[1], 2);
        TextDrawSetProportional(nosl[1], 1);

        Register[2] = TextDrawCreate(234.999984, 202.014801, "MALE:");
        TextDrawLetterSize(Register[2], 0.321332, 1.409185);
        TextDrawTextSize(Register[2], 408.000030, 15.074075);
        TextDrawAlignment(Register[2], 1);
        TextDrawColor(Register[2], -1);
        TextDrawUseBox(Register[2], true);
        TextDrawBoxColor(Register[2], 572662303);
        TextDrawSetShadow(Register[2], 0);
        TextDrawSetOutline(Register[2], 1);
        TextDrawBackgroundColor(Register[2], 51);
        TextDrawFont(Register[2], 2);
        TextDrawSetProportional(Register[2], 1);
        TextDrawSetSelectable(Register[2], true);

        BG[3] = TextDrawCreate(410.666656, 206.833343, "usebox");
        TextDrawLetterSize(BG[3], 0.000000, 0.789505);
        TextDrawTextSize(BG[3], 275.666656, 0.000000);
        TextDrawAlignment(BG[3], 1);
        TextDrawColor(BG[3], 0);
        TextDrawUseBox(BG[3], true);
        TextDrawBoxColor(BG[3], 102);
        TextDrawSetShadow(BG[3], 0);
        TextDrawSetOutline(BG[3], 0);
        TextDrawFont(BG[3], 0);

        nosl[0] = TextDrawCreate(319.000000, 204.918502, "_");
        TextDrawLetterSize(nosl[0], 0.216666, 1.122963);
        TextDrawAlignment(nosl[0], 1);
        TextDrawColor(nosl[0], -1);
        TextDrawSetShadow(nosl[0], 0);
        TextDrawSetOutline(nosl[0], 1);
        TextDrawBackgroundColor(nosl[0], 51);
        TextDrawFont(nosl[0], 2);
        TextDrawSetProportional(nosl[0], 1);

        Register[3] = TextDrawCreate(289.999969, 249.303771, "SPAWN");
        TextDrawLetterSize(Register[3], 0.449999, 1.600000);
        TextDrawTextSize(Register[3], 347.333282, 15.244444);
        TextDrawAlignment(Register[3], 1);
        TextDrawColor(Register[3], -1);
        TextDrawUseBox(Register[3], true);
        TextDrawBoxColor(Register[3], 572662303);
        TextDrawSetShadow(Register[3], 0);
        TextDrawSetOutline(Register[3], 1);
        TextDrawBackgroundColor(Register[3], 51);
        TextDrawFont(Register[3], 1);
        TextDrawSetProportional(Register[3], 1);
        TextDrawSetSelectable(Register[3], true);
        // ??????????? -------------------------------------------------------------
        BGG[0] = TextDrawCreate(410.666625, 149.174072, "usebox");
        TextDrawLetterSize(BGG[0], 0.000000, 17.428190);
        TextDrawTextSize(BGG[0], 230.000015, 0.000000);
        TextDrawAlignment(BGG[0], 1);
        TextDrawColor(BGG[0], 0);
        TextDrawUseBox(BGG[0], true);
        TextDrawBoxColor(BGG[0], 1721355434);
        TextDrawSetShadow(BGG[0], 0);
        TextDrawSetOutline(BGG[0], 0);
        TextDrawFont(BGG[0], 0);

        texttext1[0] = TextDrawCreate(254.666656, 146.844421, "new.pwn Role Play");
        TextDrawLetterSize(texttext1[0], 0.395332, 1.770074);
        TextDrawAlignment(texttext1[0], 1);
        TextDrawColor(texttext1[0], -1);
        TextDrawSetShadow(texttext1[0], 0);
        TextDrawSetOutline(texttext1[0], 1);
        TextDrawBackgroundColor(texttext1[0], 51);
        TextDrawFont(texttext1[0], 1);
        TextDrawSetProportional(texttext1[0], 1);

        BGG[1] = TextDrawCreate(410.666656, 166.596282, "usebox");
        TextDrawLetterSize(BGG[1], 0.000000, 0.697327);
        TextDrawTextSize(BGG[1], 230.000000, 0.000000);
        TextDrawAlignment(BGG[1], 1);
        TextDrawColor(BGG[1], 0);
        TextDrawUseBox(BGG[1], true);
        TextDrawBoxColor(BGG[1], 102);
        TextDrawSetShadow(BGG[1], 0);
        TextDrawSetOutline(BGG[1], 0);
        TextDrawFont(BGG[1], 0);

        Login[0] = TextDrawCreate(234.666549, 178.785247, "PASSWORD:");
        TextDrawLetterSize(Login[0], 0.272332, 1.508739);
        TextDrawTextSize(Login[0], 409.000152, 8.711111);
        TextDrawAlignment(Login[0], 1);
        TextDrawColor(Login[0], -1);
        TextDrawUseBox(Login[0], true);
        TextDrawBoxColor(Login[0], 572662303);
        TextDrawSetShadow(Login[0], 0);
        TextDrawSetOutline(Login[0], 1);
        TextDrawBackgroundColor(Login[0], 51);
        TextDrawFont(Login[0], 2);
        TextDrawSetProportional(Login[0], 1);
        TextDrawSetSelectable(Login[0], true);

        oppg[0] = TextDrawCreate(335.666748, 179.614791, "_");
        TextDrawLetterSize(oppg[0], 0.192332, 1.276443);
        TextDrawAlignment(oppg[0], 1);
        TextDrawColor(oppg[0], -1);
        TextDrawSetShadow(oppg[0], 0);
        TextDrawSetOutline(oppg[0], 1);
        TextDrawBackgroundColor(oppg[0], 51);
        TextDrawFont(oppg[0], 2);
        TextDrawSetProportional(oppg[0], 1);

        Login[1] = TextDrawCreate(289.999969, 249.303771, "SPAWN");
        TextDrawLetterSize(Login[1], 0.449999, 1.600000);
        TextDrawTextSize(Login[1], 347.333282, 15.244444);
        TextDrawAlignment(Login[1], 1);
        TextDrawColor(Login[1], -1);
        TextDrawUseBox(Login[1], true);
        TextDrawBoxColor(Login[1], 572662303);
        TextDrawSetShadow(Login[1], 0);
        TextDrawSetOutline(Login[1], 1);
        TextDrawBackgroundColor(Login[1], 51);
        TextDrawFont(Login[1], 1);
        TextDrawSetProportional(Login[1], 1);
        TextDrawSetSelectable(Login[1], true);
}

stock SavePlayer(playerid)
{
        new string[50];
    format(string, sizeof(string), "users/%s.ini", PI[playerid][pName]);
    new iniFile = ini_openFile(string);
    if(!iniFile)
    {
        ini_setInteger(iniFile, "Male", PI[playerid][pMale]);
        ini_setInteger(iniFile, "Skin", PI[playerid][pSkin]);
        ini_closeFile(iniFile);
    }
}
Кароче смотри я переделал систему, написал на MxINI, и теперь нужно ошибки фиксануть

Посмотреть вложение 184439
70 строка - неизвестная функций Regisster, перемести ее перед 70 строкой
97 - неизвестная переменная PI, у тебя вместо нее pInfo или Player_Info