Рекомендованные сообщения



Не найдено.

4 posts in this topic

Спойлер

case D_CONT1:
	{
		if(!response) return 1;
		new cena = 700000;
		if(PI[playerid][pCash] < cena) return SendClientMessage(playerid, -1, "Тут слова.");
  		MysqlUpdatePlayerInt(playerid, "cash",PI[playerid][pCash]);
		ConteinerOpen(playerid,1);  //Ошибка тут(помогите плез)
		PI[playerid][pCash] -= cena;
		new string[50];
		format(string, 50, "%d", PI[playerid][pCash]);
		PlayerTextDrawSetString(playerid, PTD_CASH[playerid][10], string);
	}


вот stock
stock ConteinerOpen(playerid,cont)
{
    if(cont == 1)
    {
        new rand = random(110);
        switch(rand)
        {
            case 0..10:
            {
                SendClientMessage(playerid, -1, "Âàì íè÷åãî íå âûïàëî");
            }
            case 11..40:
            {
            SendClientMessage(playerid, -1, "Âàì âûïàë àâòîìîáèëü ÂÀÇ");
            global_string = "";
            mysql_format(dbHandle, global_string, 500, "\
            INSERT INTO `ownable_cars` (c_model, c_x, c_y, c_z, c_a, c_class, c_owner, c_fuel, c_color1, c_color2, c_lock, c_price) VALUES \
            ('404', '0', '0', '0', '0', '1', '%s', '45', '1', '1', '1', '2000000')",
            GetName(playerid));
            mysql_tquery(dbHandle, global_string, "", "");
            }
            case 41..100:
            {
            SendClientMessage(playerid, -1, "Âàì âûïàë àâòîìîáèëü Lada Êàëèíà");
            global_string = "";
            mysql_format(dbHandle, global_string, 500, "\
            INSERT INTO `ownable_cars` (c_model, c_x, c_y, c_z, c_a, c_class, c_owner, c_fuel, c_color1, c_color2, c_lock, c_price) VALUES \
            ('411', '0', '0', '0', '0', '1', '%s', '45', '1', '1', '1', '2000000')",
            GetName(playerid));
            mysql_tquery(dbHandle, global_string, "", "");
            }
            case 101..105:
            {
                new rand1 = random(500000) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d ðóáëåé", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                TransferMoney(-1, playerid, rand1);
            }
            case 106..110:
            {
            SendClientMessage(playerid, -1, "Âàì âûïàë àâòîìîáèëü ÂÀÇ 2109");
            global_string = "";
            mysql_format(dbHandle, global_string, 500, "\
            INSERT INTO `ownable_cars` (c_model, c_x, c_y, c_z, c_a, c_class, c_owner, c_fuel, c_color1, c_color2, c_lock, c_price) VALUES \
            ('492', '0', '0', '0', '0', '1', '%s', '45', '1', '1', '1', '2000000')",
            GetName(playerid));
            mysql_tquery(dbHandle, global_string, "", "");
            }
        }
        SendClientMessage(playerid, -1, "Âû îòêðûëè êîíòåéíåð èç {008080}Ðîññèè");
    }
    if(cont == 2)
    {
        new rand = random(220);
        switch(rand)
        {
            case 0..10:
            {
                SendClientMessage(playerid, -1, "Âàì íè÷åãî íå âûïàëî");
            }
            case 11..40:
            {
                GivePlayerWeaponAC(playerid, 27, 1000);
            }
            case 41..100:
            {
                GivePlayerWeaponAC(playerid, 33, 1000);
            }
            case 101..105:
            {
                new rand1 = random (500000) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d ðóáëåé", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                TransferMoney(-1, playerid, rand1);
            }
            case 106..140:
            {
                GivePlayerWeaponAC(playerid, 9, 1);
            }
            case 141..180:
            {
                GivePlayerWeaponAC(playerid, 31, 2000);
            }
            case 181..220:
            {
                GivePlayerWeaponAC(playerid, 24, 500);
            }
        }
        SendClientMessage(playerid, -1, "Âû îòêðûëè êîíòåéíåð ñ {008080}Îðóæèåì");
    }
    if(cont == 3)
    {
        new rand = random(110);
        switch(rand)
        {
            case 0..10:
            {
                SendClientMessage(playerid, -1, "Âàì íè÷åãî íå âûïàëî");
            }
            case 11..40:
            {
               SendClientMessage(playerid, -1, "Âàì âûïàë àâòîìîáèëü BMX X5");
            global_string = "";
            mysql_format(dbHandle, global_string, 500, "\
            INSERT INTO `ownable_cars` (c_model, c_x, c_y, c_z, c_a, c_class, c_owner, c_fuel, c_color1, c_color2, c_lock, c_price) VALUES \
            ('400', '0', '0', '0', '0', '1', '%s', '45', '1', '1', '1', '2000000')",
            GetName(playerid));
            mysql_tquery(dbHandle, global_string, "", "");
            }
            case 41..100:
            {
            SendClientMessage(playerid, -1, "Âàì âûïàë àâòîìîáèëü BMW 535i");
            global_string = "";
            mysql_format(dbHandle, global_string, 500, "\
            INSERT INTO `ownable_cars` (c_model, c_x, c_y, c_z, c_a, c_class, c_owner, c_fuel, c_color1, c_color2, c_lock, c_price) VALUES \
            ('466', '0', '0', '0', '0', '1', '%s', '45', '1', '1', '1', '2000000')",
            GetName(playerid));
            mysql_tquery(dbHandle, global_string, "", "");
            }
            case 101..110:
            {
                new rand1 = random (500000) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d ðóáëåé", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                TransferMoney(-1, playerid, rand1);
            }
        }
        SendClientMessage(playerid, -1, "Âû îòêðûëè êîíòåéíåð èç {008080}Ãåðìàíèè");
    }
    if(cont == 4)
    {
        new rand = random(110);
        new stringg[128];
        switch(rand)
        {
            case 0..10:
            {
                SendClientMessage(playerid, -1, "Âàì íè÷åãî íå âûïàëî");
            }
            case 11..40:
            {
                new rand1 = random (50) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d "SERVER_COINS"", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                format(stringg, sizeof(stringg), "UPDATE "T_ACCOUNTS" SET credits=%d WHERE name='%s'", PI[playerid][pElegantCoins]+rand1, GetName(playerid));
                mysql_tquery(dbHandle, stringg, "", "");
                PI[playerid][pElegantCoins] += rand1;
            }
            case 41..100:
            {
                new rand1 = random (100) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d "SERVER_COINS"", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                format(stringg, sizeof(stringg), "UPDATE "T_ACCOUNTS" SET credits=%d WHERE name='%s'", PI[playerid][pElegantCoins]+rand1, GetName(playerid));
                mysql_tquery(dbHandle, stringg, "", "");
                PI[playerid][pElegantCoins] += rand1;
            }
            case 101..108:
            {
                new rand1 = random (200) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d "SERVER_COINS"", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                format(stringg, sizeof(stringg), "UPDATE "T_ACCOUNTS" SET credits=%d WHERE name='%s'", PI[playerid][pElegantCoins]+rand1, GetName(playerid));
                mysql_tquery(dbHandle, stringg, "", "");
                PI[playerid][pElegantCoins] += rand1;
            }
            case 109..110:
            {
                new rand1 = random (5000) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d "SERVER_COINS"", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                format(stringg, sizeof(stringg), "UPDATE "T_ACCOUNTS" SET credits=%d WHERE name='%s'", PI[playerid][pElegantCoins]+rand1, GetName(playerid));
                mysql_tquery(dbHandle, stringg, "", "");
                PI[playerid][pElegantCoins] += rand1;
            }
        }
        SendClientMessage(playerid, -1, "Âû îòêðûëè êîíòåéíåð ñ {008080}"SERVER_COINS"");
    }
    if(cont == 5)
    {
        new rand = random(110);
        switch(rand)
        {
            case 0..10:
            {
                SendClientMessage(playerid, -1, "Âàì íè÷åãî íå âûïàëî");
            }
            case 11..40:
            {
                new rand1 = random (7000000) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d ðóáëåé", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                TransferMoney(-1, playerid, rand1);
            }
            case 41..100:
            {
                new rand1 = random (5000000) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d ðóáëåé", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                TransferMoney(-1, playerid, rand1);
            }
            case 101..105:
            {
                new rand1 = random (50000) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d ðóáëåé", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                TransferMoney(-1, playerid, rand1);
            }
            case 106..110:
            {
                new rand1 = random (10000000) + 1;
                new textpobeda[128];
                format(textpobeda, sizeof(textpobeda), "Âàì âûïàëî %d ðóáëåé", rand1);
                SendClientMessage(playerid, -1, textpobeda);
                TransferMoney(-1, playerid, rand1);
            }
        }
        SendClientMessage(playerid, -1, "Âû îòêðûëè êîíòåéíåð ñ {008080}Äåíüãàìè");
    }
    if(cont == 6)
    {
        new rand = random(110);
        switch(rand)
        {
            case 0..10:
            {
                SendClientMessage(playerid, -1, "Âàì íè÷åãî íå âûïàëî");
            }
            case 11..40:
            {
            SendClientMessage(playerid, -1, "Âàì âûïàë àâòîìîáèëü 1");
            global_string = "";
            mysql_format(dbHandle, global_string, 500, "\
            INSERT INTO `ownable_cars` (c_model, c_x, c_y, c_z, c_a, c_class, c_owner, c_fuel, c_color1, c_color2, c_lock, c_price) VALUES \
            ('434', '0', '0', '0', '0', '1', '%s', '45', '1', '1', '1', '2000000')",
            GetName(playerid));
            mysql_tquery(dbHandle, global_string, "", "");
            }
            case 41..100:
            {
            SendClientMessage(playerid, -1, "Âàì âûïàë àâòîìîáèëü 2");
            global_string = "";
            mysql_format(dbHandle, global_string, 500, "\
            INSERT INTO `ownable_cars` (c_model, c_x, c_y, c_z, c_a, c_class, c_owner, c_fuel, c_color1, c_color2, c_lock, c_price) VALUES \
            ('451', '0', '0', '0', '0', '1', '%s', '45', '1', '1', '1', '2000000')",
            GetName(playerid));
            mysql_tquery(dbHandle, global_string, "", "");
            }
            case 101..105:
            {
            SendClientMessage(playerid, -1, "Âàì âûïàë àâòîìîáèëü 3");
            global_string = "";
            mysql_format(dbHandle, global_string, 500, "\
            INSERT INTO `ownable_cars` (c_model, c_x, c_y, c_z, c_a, c_class, c_owner, c_fuel, c_color1, c_color2, c_lock, c_price) VALUES \
            ('494', '0', '0', '0', '0', '1', '%s', '45', '1', '1', '1', '2000000')",
            GetName(playerid));
            mysql_tquery(dbHandle, global_string, "", "");
            }
        }
        SendClientMessage(playerid, -1, "Âû îòêðûëè êîíòåéíåð èç {008080}Ðîññèè");
    }
}

 

Помогите плеез

 

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

Пожалуйста, ознакомьтесь с информацией о том, как правильно публиковать код.

Share this post


Link to post
Share on other sites

MysqlUpdatePlayerInt покажи

Share this post


Link to post
Share on other sites

TS Posted (edited) · Report post

@SCRIPTMAN

Спойлер

stock MysqlUpdatePlayerInt(playerid, field[], data)
{
    new Query[128];
    format(Query, sizeof(Query), "UPDATE "T_ACCOUNTS" SET %s = '%i' WHERE id = '%i' LIMIT 1", field, data, PI[playerid][pID]);
    return mysql_tquery(dbHandle, Query, "", "");
}

 

 

Edited by odosenok
Причина: заключил код в теги "Код" и "Спойлер".

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

Пожалуйста, ознакомьтесь с информацией о том, как правильно публиковать код.

Share this post


Link to post
Share on other sites

@Admin1, попробуйте закомментировать весь D_CONT1 внутри switch. Ошибка сохраняется? И да, может прозвучит глупо, но Вы точно сохраняете файл после редактирования перед компиляцией?

Share this post


Link to post
Share on other sites
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

    • warrion4ik
      By warrion4ik
      При телепорте по метке она тепает под текстуры и приходится перетелепортироваться, как это можно исправить?
      Видео: https://youtu.be/FLjer8lfGc0