Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

вирт миры

Июл
349
116
Активный
Помогите сделать так, что бы при в ходе в одну инту людей кидало по разным мирам
 
Июл
210
55
Активный
ответ chat gpt
Код:
#include <a_samp>


// Функция для определения мира для нового игрока
new int GetRandomWorld()
{
    // Генерация случайного числа от 0 до 2 (включительно)
    new randomWorld = random(3);


    // Возвращение случайного мира
    return randomWorld;
}


// Обработчик события входа игрока в игру
public Action:onPlayerConnect(playerid)
{
    // Получение случайного мира для игрока
    new world = GetRandomWorld();


    // Перемещение игрока в выбранный мир
    switch (world)
    {
        case 0:
            // Код перемещения в мир 0
            break;
        case 1:
            // Код перемещения в мир 1
            break;
        case 2:
            // Код перемещения в мир 2
            break;
    }


    // Вывод сообщения игроку о том, в каком мире он оказался
    SendClientMessage(playerid, -1, "Добро пожаловать в мир: ");
    SendClientMessage(playerid, -1, world == 0 ? "Мир 0" : world == 1 ? "Мир 1" : "Мир 2");


    return 1;
}
 
Июл
349
116
Активный
ответ chat gpt
Код:
#include <a_samp>


// Функция для определения мира для нового игрока
new int GetRandomWorld()
{
    // Генерация случайного числа от 0 до 2 (включительно)
    new randomWorld = random(3);


    // Возвращение случайного мира
    return randomWorld;
}


// Обработчик события входа игрока в игру
public Action:onPlayerConnect(playerid)
{
    // Получение случайного мира для игрока
    new world = GetRandomWorld();


    // Перемещение игрока в выбранный мир
    switch (world)
    {
        case 0:
            // Код перемещения в мир 0
            break;
        case 1:
            // Код перемещения в мир 1
            break;
        case 2:
            // Код перемещения в мир 2
            break;
    }


    // Вывод сообщения игроку о том, в каком мире он оказался
    SendClientMessage(playerid, -1, "Добро пожаловать в мир: ");
    SendClientMessage(playerid, -1, world == 0 ? "Мир 0" : world == 1 ? "Мир 1" : "Мир 2");


    return 1;
}
че то по моему какой то не завершенный бред
 
Июл
349
116
Активный
в коде добавь
SetPlayerVirtualWorld(playerid, playerid);
куда?
Pawn:
enum tpInfo
{
    tpName[50],
    Float:tpEnterPos_X,
    Float:tpEnterPos_Y,
    Float:tpEnterPos_Z,
    tpEnterWorld,
    tpEnterInt,
    Float:tpExitPos_X,
    Float:tpExitPos_Y,
    Float:tpExitPos_Z,
    Float:tpExitPos_A,
    tpExitInt,
    tpExitWorld
}

new TeleportInfo[][tpInfo] =
{
    {"Дом ведьмы",-1059.992675, -1205.296630, 129.218750, 0, 0, 281.16799926758,41.762001037598,1011.0999755859, suda, suda},
и там где "suda" нужно вставить номер вирт мира и инты, если пишу вместо "suda" "playerid" то ломается система
 
𝚖𝚘𝚛𝚜 𝚌𝚎𝚛𝚝𝚊, 𝚑𝚘𝚛𝚊 𝚒𝚗𝚌𝚎𝚛𝚝𝚊.
Янв
1,555
3,407
Команда форума
Администратор
ответ chat gpt
Код:
#include <a_samp>


// Функция для определения мира для нового игрока
new int GetRandomWorld()
{
    // Генерация случайного числа от 0 до 2 (включительно)
    new randomWorld = random(3);


    // Возвращение случайного мира
    return randomWorld;
}


// Обработчик события входа игрока в игру
public Action:onPlayerConnect(playerid)
{
    // Получение случайного мира для игрока
    new world = GetRandomWorld();


    // Перемещение игрока в выбранный мир
    switch (world)
    {
        case 0:
            // Код перемещения в мир 0
            break;
        case 1:
            // Код перемещения в мир 1
            break;
        case 2:
            // Код перемещения в мир 2
            break;
    }


    // Вывод сообщения игроку о том, в каком мире он оказался
    SendClientMessage(playerid, -1, "Добро пожаловать в мир: ");
    SendClientMessage(playerid, -1, world == 0 ? "Мир 0" : world == 1 ? "Мир 1" : "Мир 2");


    return 1;
}
я слегка не выкупаю, нахуя ты даешь ответ, с нейронки - если сам автор темы, мог самостоятельно залезть в нейронку, и с ней уже ебаться?))0
 
Июл
349
116
Активный
Pawn:
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9776) : error 017: undefined symbol "playerid"
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9778) : error 020: invalid symbol name ""
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9780) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9783) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9786) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9792) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9796) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9799) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9805) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9811) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9816) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9820) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9829) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9836) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9839) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9842) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9845) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9854) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9867) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9878) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9881) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9899) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9902) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9905) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9908) : error 055: start of function body without function header
C:\Users\kiril\Desktop\lengli\gamemodes\arizona.pwn(9911) : error 055: start of function body without function header

Compilation aborted.

Pawn compiler 3.10.8              Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.

Pawn:
    {"Дом Ведьмы",-1059.992675, -1205.296630, 129.218750, 0, 0, 281.16799926758,41.762001037598,1011.0999755859, playerid, playerid},
 
Июл
349
116
Активный
𝚖𝚘𝚛𝚜 𝚌𝚎𝚛𝚝𝚊, 𝚑𝚘𝚛𝚊 𝚒𝚗𝚌𝚎𝚛𝚝𝚊.
Янв
1,555
3,407
Команда форума
Администратор
𝚖𝚘𝚛𝚜 𝚌𝚎𝚛𝚝𝚊, 𝚑𝚘𝚛𝚊 𝚒𝚗𝚌𝚎𝚛𝚝𝚊.
Янв
1,555
3,407
Команда форума
Администратор
Сверху