Question

    {
    cef_create_browser(playerid, LOGIN_BROWSER_ID, "beget.com/ru"falsefalse); //создаем браузер
    return 1;
    }
Спойлер

 

C:\Users\User\Downloads\F-RP\gamemodes\new.pwn(8632) : warning 225: unreachable code
Pawn compiler 3.10.20150531              Copyright (c) 1997-2006, ITB CompuPhase

Header size:          18948 bytes
Code size:          4053636 bytes
Data size:         12612640 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:16701608 bytes

1 Warning.

 

Не могу решить эту проблему. Всю голову сломал

Share this post


Link to post

5 answers to this question

  • 1
public OnPlayerSpawn(playerid)
{
    if(IsPlayerLogged(playerid) == false)
    {
        SCM(playerid, -1"Âû íå àâòîðèçèðîâàíû!");
        return Kick:(playerid);
    }

    player_tie[playerid] = false;

    SetPlayerHealthEx(playerid, 100.0);

    if(player_can_spawn[playerid] == false) OnPlayerCheat(playerid, false"381");
    player_can_spawn[playerid] = false;

    CheckPlayerFlood(playerid, true, MAX_FLOOD_RATE, 500, FLOOD_RATE_KICK);

    SetPlayerData(playerid, P_IN_HOUSE,         -1);
    SetPlayerData(playerid, P_IN_BUSINESS,         -1);
    SetPlayerData(playerid, P_IN_ENTRANCE,        -1);

    SetPlayerSkillsInit(playerid);

    if(GetPlayerData(playerid, P_REALTOR_TYPE) != REALTOR_TYPE_NONE) return 1;


    if(!GetPlayerData(playerid, P_SKIN))
    {
        if(GetPVarInt(playerid, "way") == 1//îíî çäåñü
        {
            new rand = random(45) + 16;
            
            if(GetPlayerData(playerid, P_SEX) == 0)
            {
                switch(random(4))
                {
                    case 0: SetPlayerData(playerid, P_SKIN, 2);
                    case 1: SetPlayerData(playerid, P_SKIN, 7);
                    case 2: SetPlayerData(playerid, P_SKIN, 14);
                    case 3: SetPlayerData(playerid, P_SKIN, 20);
                }
            }
            else if(GetPlayerData(playerid, P_SEX) == 1)
            {
                switch(random(4))
                {
                    case 0: SetPlayerData(playerid, P_SKIN, 12);
                    case 1: SetPlayerData(playerid, P_SKIN, 13);
                    case 2: SetPlayerData(playerid, P_SKIN, 41);
                    case 3: SetPlayerData(playerid, P_SKIN, 56);
                }
            }
            
            
            format(format_string, 96"UPDATE accounts SET skin=%d,last_login=%d WHERE id=%d", GetPlayerSkinEx(playerid), gettime(), GetPlayerAccountID(playerid));
            mysql_tquery(mysql, format_string);
            
            SetPlayerData(playerid, P_LAW_ABIDING, rand);
            SetPlayerData(playerid, P_EXP, 2);
            
            CancelSelectTextDrawEx(playerid);
            
            GivePlayerMoneyEx(playerid, 2500"ñòàðòàï");
            
            SetPlayerData(playerid, P_SELECT_SKIN, -1);

            SetPlayerData(playerid, P_ACCOUNT_STATE, ACCOUNT_STATE_NONE);

            SetPlayerSpawnInit(playerid);
            SpawnPlayer(playerid);

            SetPlayerInit(playerid);
            
            SetPlayerSpawnPos(playerid);
            
            //StartGameAfterReg(playerid);
        }
        if(GetPVarInt(playerid, "way") == 2//îíî çäåñü
        {
            if(GetPlayerData(playerid, P_SEX) == 0)
            {
                switch(random(4))
                {
                    case 0: SetPlayerData(playerid, P_SKIN, 100);
                    case 1: SetPlayerData(playerid, P_SKIN, 102);
                    case 2: SetPlayerData(playerid, P_SKIN, 103);
                    case 3: SetPlayerData(playerid, P_SKIN, 104);
                }
            }
            else if(GetPlayerData(playerid, P_SEX) == 1)
            {
                switch(random(4))
                {
                    case 0: SetPlayerData(playerid, P_SKIN, 12);
                    case 1: SetPlayerData(playerid, P_SKIN, 13);
                    case 2: SetPlayerData(playerid, P_SKIN, 41);
                    case 3: SetPlayerData(playerid, P_SKIN, 56);
                }
            }


            format(format_string, 96"UPDATE accounts SET skin=%d,last_login=%d WHERE id=%d", GetPlayerSkinEx(playerid), gettime(), GetPlayerAccountID(playerid));
            mysql_tquery(mysql, format_string);
            
            SetPlayerData(playerid, P_SKILL_COLT, 50);
            SetPlayerData(playerid, P_SKILL_SDPISTOL, 50);
            SetPlayerData(playerid, P_SKILL_DEAGLE50);
            SetPlayerData(playerid, P_SKILL_SHOTGUN, 50);
            SetPlayerData(playerid, P_SKILL_MP5, 50);
             SetPlayerData(playerid, P_SKILL_AK47, 50);
            SetPlayerData(playerid, P_SKILL_M4, 50);
            SetPlayerData(playerid, P_SKILL_SNIPER_RIFLE, 50);
            SetPlayerData(playerid, P_SKILL_SAWNOFF, 50);
            SetPlayerData(playerid, P_SKILL_COMBAT_SG, 50);
            SetPlayerData(playerid, P_SKILL_MICRO_UZI, 50);

            SetPlayerData(playerid, P_LAW_ABIDING, -50);

            CancelSelectTextDrawEx(playerid);

            SetPlayerData(playerid, P_SELECT_SKIN, -1);

            SetPlayerData(playerid, P_ACCOUNT_STATE, ACCOUNT_STATE_NONE);

            SetPlayerSpawnInit(playerid);
            SpawnPlayer(playerid);

            SetPlayerInit(playerid);

            SetPlayerSpawnPos(playerid);

            //StartGameAfterReg(playerid);
        }
    }
    else
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);

        SetPlayerSpawnPos(playerid);

        if(GetPlayerData(playerid, P_HOSPITAL)) SetPlayerHealthEx(playerid, 15.0);

        if(!GetPlayerData(playerid, P_ANIMS_INIT))
        {
            PreLoadPlayerAnims(playerid);
            SetPlayerData(playerid, P_ANIMS_INIT, true);
        }

        if(player_time_map_hide[playerid])
        {
            SetPlayerColorInit(playerid);
            player_time_map_hide[playerid] = 0;
        }
    }

    cef_create_browser(playerid, LOGIN_BROWSER_ID, "beget.com/ru"falsefalse); //??????? ???????
    return 1;
}

 

Share this post


Link to post
  • 1

@Ragozin 

Спойлер

CMD:check_plugin(playerid)
{
    new string[64];
    format(string, sizeof(string), "Плагин загружен - %s", cef_player_has_plugin(playerid) ? ("{ffc600}Успешно") : ("{ff0000}Не удачно"));
    return SendClientMessage(playerid, -1, string);
}

 

 

Edited by _bogdan_

Share this post


Link to post
  • 0

@Sleash`en 

public OnPlayerSpawn(playerid)
{
    if(IsPlayerLogged(playerid) == false)
    {
        SCM(playerid, -1"Âû íå àâòîðèçèðîâàíû!");
        return Kick:(playerid);
    }

    player_tie[playerid] = false;

    SetPlayerHealthEx(playerid, 100.0);

    if(player_can_spawn[playerid] == false) OnPlayerCheat(playerid, false"381");
    player_can_spawn[playerid] = false;

    CheckPlayerFlood(playerid, true, MAX_FLOOD_RATE, 500, FLOOD_RATE_KICK);

    SetPlayerData(playerid, P_IN_HOUSE,         -1);
    SetPlayerData(playerid, P_IN_BUSINESS,         -1);
    SetPlayerData(playerid, P_IN_ENTRANCE,        -1);

    SetPlayerSkillsInit(playerid);

    if(GetPlayerData(playerid, P_REALTOR_TYPE) != REALTOR_TYPE_NONE) return 1;


    if(!GetPlayerData(playerid, P_SKIN))
    {
        if(GetPVarInt(playerid, "way") == 1//îíî çäåñü
        {
            new rand = random(45) + 16;
            
            if(GetPlayerData(playerid, P_SEX) == 0)
            {
                switch(random(4))
                {
                    case 0: SetPlayerData(playerid, P_SKIN, 2);
                    case 1: SetPlayerData(playerid, P_SKIN, 7);
                    case 2: SetPlayerData(playerid, P_SKIN, 14);
                    case 3: SetPlayerData(playerid, P_SKIN, 20);
                }
            }
            else if(GetPlayerData(playerid, P_SEX) == 1)
            {
                switch(random(4))
                {
                    case 0: SetPlayerData(playerid, P_SKIN, 12);
                    case 1: SetPlayerData(playerid, P_SKIN, 13);
                    case 2: SetPlayerData(playerid, P_SKIN, 41);
                    case 3: SetPlayerData(playerid, P_SKIN, 56);
                }
            }
            
            
            format(format_string, 96"UPDATE accounts SET skin=%d,last_login=%d WHERE id=%d", GetPlayerSkinEx(playerid), gettime(), GetPlayerAccountID(playerid));
            mysql_tquery(mysql, format_string);
            
            SetPlayerData(playerid, P_LAW_ABIDING, rand);
            SetPlayerData(playerid, P_EXP, 2);
            
            CancelSelectTextDrawEx(playerid);
            
            GivePlayerMoneyEx(playerid, 2500"ñòàðòàï");
            
            SetPlayerData(playerid, P_SELECT_SKIN, -1);

            SetPlayerData(playerid, P_ACCOUNT_STATE, ACCOUNT_STATE_NONE);

            SetPlayerSpawnInit(playerid);
            SpawnPlayer(playerid);

            SetPlayerInit(playerid);
            
            SetPlayerSpawnPos(playerid);
            
            //StartGameAfterReg(playerid);
        }
        if(GetPVarInt(playerid, "way") == 2//îíî çäåñü
        {
            if(GetPlayerData(playerid, P_SEX) == 0)
            {
                switch(random(4))
                {
                    case 0: SetPlayerData(playerid, P_SKIN, 100);
                    case 1: SetPlayerData(playerid, P_SKIN, 102);
                    case 2: SetPlayerData(playerid, P_SKIN, 103);
                    case 3: SetPlayerData(playerid, P_SKIN, 104);
                }
            }
            else if(GetPlayerData(playerid, P_SEX) == 1)
            {
                switch(random(4))
                {
                    case 0: SetPlayerData(playerid, P_SKIN, 12);
                    case 1: SetPlayerData(playerid, P_SKIN, 13);
                    case 2: SetPlayerData(playerid, P_SKIN, 41);
                    case 3: SetPlayerData(playerid, P_SKIN, 56);
                }
            }


            format(format_string, 96"UPDATE accounts SET skin=%d,last_login=%d WHERE id=%d", GetPlayerSkinEx(playerid), gettime(), GetPlayerAccountID(playerid));
            mysql_tquery(mysql, format_string);
            
            SetPlayerData(playerid, P_SKILL_COLT, 50);
            SetPlayerData(playerid, P_SKILL_SDPISTOL, 50);
            SetPlayerData(playerid, P_SKILL_DEAGLE, 50);
            SetPlayerData(playerid, P_SKILL_SHOTGUN, 50);
            SetPlayerData(playerid, P_SKILL_MP5, 50);
             SetPlayerData(playerid, P_SKILL_AK47, 50);
            SetPlayerData(playerid, P_SKILL_M4, 50);
            SetPlayerData(playerid, P_SKILL_SNIPER_RIFLE, 50);
            SetPlayerData(playerid, P_SKILL_SAWNOFF, 50);
            SetPlayerData(playerid, P_SKILL_COMBAT_SG, 50);
            SetPlayerData(playerid, P_SKILL_MICRO_UZI, 50);

            SetPlayerData(playerid, P_LAW_ABIDING, -50);

            CancelSelectTextDrawEx(playerid);

            SetPlayerData(playerid, P_SELECT_SKIN, -1);

            SetPlayerData(playerid, P_ACCOUNT_STATE, ACCOUNT_STATE_NONE);

            SetPlayerSpawnInit(playerid);
            SpawnPlayer(playerid);

            SetPlayerInit(playerid);

            SetPlayerSpawnPos(playerid);

            //StartGameAfterReg(playerid);
        }
    }
    else
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);

        SetPlayerSpawnPos(playerid);

        if(GetPlayerData(playerid, P_HOSPITAL)) SetPlayerHealthEx(playerid, 15.0);

        if(!GetPlayerData(playerid, P_ANIMS_INIT))
        {
            PreLoadPlayerAnims(playerid);
            SetPlayerData(playerid, P_ANIMS_INIT, true);
        }

        if(player_time_map_hide[playerid])
        {
            SetPlayerColorInit(playerid);
            player_time_map_hide[playerid] = 0;
        }
    }

    return 1;
    
     {
    cef_create_browser(playerid, LOGIN_BROWSER_ID, "beget.com/ru"falsefalse); //??????? ???????
    return 1;
    }
    
}

 

Share this post


Link to post
  • 0

@danya_white 

Цитата

 

C:\Users\Downloads\Friendly\gamemodes\new.pwn(54534) : error 001: expected token: ";", but found "return"
Pawn compiler 3.10.20150531              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

 

Цитата

CMD:check_plugin(playerid)
{
    new string[64];
    format(string, sizeof(string), "Плагин загружен - %s", cef_player_has_plugin(playerid) ? ("{ffc600}Успешно") : ("{ff0000}Не удачно"))
    return SendClientMessage(playerid, -1, string);
}

 

Edited by Ragozin

Заметка от _bogdan_ , создано

2.8. Если вы нашли ответ на свой вопрос, рекомендуется поощрить автора лучшего ответа поднятием репутации, а также обязательно пометить ответ на вопрос лучшим.  Как пометить ответ лучшим?

Устное предупреждение.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Redmondd
      By Redmondd
      При запуске сервера в консоли пишет: Started server on port: 7777, with maxplayers: 500 lanmode is OFF.
      И когда захожу на сервер пишет server didnt respond
       
      ---------- 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: mysql   > MySQL plugin R7-2 successfully loaded.   Loaded.  Loading plugin: sscanf  ===============================       sscanf plugin loaded.          Version:  2.8.1    (c) 2012 Alex "Y_Less" Cole  ===============================   Loaded.  Loading plugin: dc_cmd   Daniel's CMD plugin v2.8     (c) 2014 Daniel_Cortez         www.pro-pawn.ru   Loaded.  Loading plugin: streamer *** Streamer Plugin v2.7.9 by Incognito loaded ***   Loaded.  Loaded 4 plugins. Started server on port: 7777, with maxplayers: 500 lanmode is OFF. Filterscripts ---------------   Loaded 0 filterscripts. Подключение к базе данных MYSQL успешно ---------------------------------- --------Redmond RP 01-------- ---------------------------------- Number of vehicle models: 5 Склады загружены успешно Дома (15 шт) загружены успешно