2 posts in this topic

Команда чтобы, выдавать - VIP номера российские и украинские!

Спойлер

if(strcmp(cmd, "/nomerrus", true) == 0)
{
        new str[128];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ISPOLZUY, "Используйте: /nomerrus [id] [номер] ");
        new tmpp=ReturnUser(tmp);
        if(IsPlayerConnected(tmpp))
        {
                if(!IsPlayerInAnyVehicle(tmpp)) return SendClientMessage(playerid, COLOR_ISPOLZUY, "Игрок не в автомобиле");
                new carid = GetPlayerVehicleID(tmpp);
                if(GetRealID(carid) == -1) return SendClientMessage(playerid, COLOR_GRAD2, "Игрок должен быть в своём автомобиле");
                if(strcmp(Name(tmpp),CarInfo[GetRealID(carid)][cOwner],true) != 0) return SendClientMessage(playerid, COLOR_ISPOLZUY, "Автомобиль не пренадлежит игроку");
                new length = strlen(cmdtext);
                while ((idx < length) && (cmdtext[idx] <= ' ')) idx++;
                new offset = idx, result[256];
                while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                {
                        result[idx - offset] = cmdtext[idx];
                        idx++;
                }
                result[idx - offset] = EOS;
                if(!strlen(result) && PlayerInfo[playerid][pAdmin]==8)
                {
                        if(!CarLabel[carid]) { }
                        else Delete3DTextLabel(CarLabel[carid]);
                        format(CarInfo[GetRealID(carid)][cNumber],64,"{FF0000}%s{FF0000}%d%d%d{FF0000}%s%s{2641FE}|RUS",randomchar(), random(9), random(9), random(9), randomchar(), randomchar());//
                        CarLabel[carid] = Create3DTextLabel(CarInfo[GetRealID(carid)][cNumber],0xFFFF00FF,0.0,0.0,0.0,40.0,0,1);
                        Attach3DTextLabelToVehicle(CarLabel[carid] , carid , 0.0, 0.0, 1.1);
                        format(str,sizeof(str),"Вам Выдали Российский Номер %s Администратор %s",CarInfo[GetRealID(carid)][cNumber],Name(playerid));
                        SendClientMessage(tmpp,-1,str);
                        format(str,sizeof(str),"Администратор %s выдал индивидуальный номер транспорта [%s]",Name(playerid),CarInfo[GetRealID(carid)][cNumber]);
                        SendAdminMessage(COLOR_RED,str);
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SaveCar(GetRealID(carid));
                        return true;
                }
                else if(PlayerInfo[playerid][pAdmin]==11)
        {
                        if(!CarLabel[carid]) { }
                        else Delete3DTextLabel(CarLabel[carid]);
                        format(CarInfo[GetRealID(carid)][cNumber],64,"{FF0000}%s {2641FE}|RUS",result);
                        CarLabel[carid] = Create3DTextLabel(CarInfo[GetRealID(carid)][cNumber],0xFFFF00FF,0.0,0.0,0.0,40.0,0,1);
                        Attach3DTextLabelToVehicle(CarLabel[carid] , carid , 0.0, 0.0, 1.1);
                        format(str,sizeof(str),"Вам Выдали Российский Номер %s Администратор %s",CarInfo[GetRealID(carid)][cNumber],Name(playerid));
                        SendClientMessage(tmpp,-1,str);
                        format(str,sizeof(str),"Администратор %s выдал индивидуальный номер транспорта [%s]",Name(playerid),CarInfo[GetRealID(carid)][cNumber]);
                        SendAdminMessage(COLOR_RED,str);
                        SaveCar(GetRealID(carid));
                        return true;
        }
                else return SendClientMessage(playerid, COLOR_GRAD1, "У вас нет прав на это!");
        }
        else return SendClientMessage(playerid, COLOR_GRAD1, "Этого игрока нет в сети!");
}

 

Спойлер

  if(strcmp(cmd, "/nomerua", true) == 0)
{
        new str[128];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ISPOLZUY, "Используйте: /nomerua [id] [номер] ");
        new tmpp=ReturnUser(tmp);
        if(IsPlayerConnected(tmpp))
        {
                if(!IsPlayerInAnyVehicle(tmpp)) return SendClientMessage(playerid, COLOR_ISPOLZUY, "Игрок не в автомобиле");
                new carid = GetPlayerVehicleID(tmpp);
                if(GetRealID(carid) == -1) return SendClientMessage(playerid, COLOR_GRAD2, "Игрок должен быть в своём автомобиле");
                if(strcmp(Name(tmpp),CarInfo[GetRealID(carid)][cOwner],true) != 0) return SendClientMessage(playerid, COLOR_ISPOLZUY, "Автомобиль не пренадлежит игроку");
                new length = strlen(cmdtext);
                while ((idx < length) && (cmdtext[idx] <= ' ')) idx++;
                new offset = idx, result[256];
                while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                {
                        result[idx - offset] = cmdtext[idx];
                        idx++;
                }
                result[idx - offset] = EOS;
                if(!strlen(result) && PlayerInfo[playerid][pAdmin]==11)
                {
                        if(!CarLabel[carid]) { }
                        else Delete3DTextLabel(CarLabel[carid]);
                        format(CarInfo[GetRealID(carid)][cNumber],64,"{FF0000}%s{FF0000}%d%d%d{000099}%s%s{00FF00}|UA",randomchar(), random(9), random(9), random(9), randomchar(), randomchar());//
                        CarLabel[carid] = Create3DTextLabel(CarInfo[GetRealID(carid)][cNumber],0xFFFF00FF,0.0,0.0,0.0,40.0,0,1);
                        Attach3DTextLabelToVehicle(CarLabel[carid] , carid , 0.0, 0.0, 1.1);
                        format(str,sizeof(str),"Вам Выдали Украинский Номер %s Администратор %s",CarInfo[GetRealID(carid)][cNumber],Name(playerid));
                        SendClientMessage(tmpp,-1,str);
                        format(str,sizeof(str),"Администратор %s выдал индивидуальный номер транспорта [%s]",Name(playerid),CarInfo[GetRealID(carid)][cNumber]);
                        SendAdminMessage(COLOR_RED,str);
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SaveCar(GetRealID(carid));
                        return true;
                }
                else if(PlayerInfo[playerid][pAdmin]==11)
        {
                        if(!CarLabel[carid]) { }
                        else Delete3DTextLabel(CarLabel[carid]);
                        format(CarInfo[GetRealID(carid)][cNumber],64,"{990066}%s {00FF00}|UA",result);
                        CarLabel[carid] = Create3DTextLabel(CarInfo[GetRealID(carid)][cNumber],0xFFFF00FF,0.0,0.0,0.0,40.0,0,1);
                        Attach3DTextLabelToVehicle(CarLabel[carid] , carid , 0.0, 0.0, 1.1);
                        format(str,sizeof(str),"Вам Выдали Украинский Номер %s Администратор %s",CarInfo[GetRealID(carid)][cNumber],Name(playerid));
                        SendClientMessage(tmpp,-1,str);
                        format(str,sizeof(str),"Администратор %s выдал индивидуальный номер транспорта [%s]",Name(playerid),CarInfo[GetRealID(carid)][cNumber]);
                        SendAdminMessage(COLOR_RED,str);
                        SaveCar(GetRealID(carid));
                        return true;
        }
                else return SendClientMessage(playerid, COLOR_GRAD1, "У вас нет прав на это!");
        }
        else return SendClientMessage(playerid, COLOR_GRAD1, "Этого игрока нет в сети!");
}

 

 

Share this post


Link to post
Share on other sites

а в какую строку их пилить?

 

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   You have pasted content with formatting.   Remove formatting

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

Loading...
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Leo_Carter
      By Leo_Carter
      Такая проблема то что я пишу мод с нуля и когда почти мод был готов, я решил его залить на хостинг, ну там есть подключение к mysql и всё подобное, только вот залил на хостинг, запускаю и у меня вот такие дебаги вылезают и сервер Unknown

       
      Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, (C)2005-2015 SA-MP Team [18:54:42] filterscripts = "" (string) [18:54:42] [18:54:42] Server Plugins [18:54:42] -------------- [18:54:42] Loading plugin: mysql_static.so [18:54:42] >> plugin.mysql: R39-2 successfully loaded. [18:54:42] Loaded. [18:54:42] Loading plugin: pawncmd.so [18:54:42] Pawn.CMD plugin v3.1.4 by urShadow loaded [18:54:42] Loaded. [18:54:42] Loading plugin: pawnregex.so [18:54:42] Pawn.Regex plugin v1.1 by urShadow loaded [18:54:42] Loaded. [18:54:42] Loading plugin: crashdetect.so [18:54:42] CrashDetect v4.18.1 is OK. [18:54:42] Loaded. [18:54:42] Loading plugin: streamer.so [18:54:42] *** Streamer Plugin v2.8.2 by Incognito loaded *** [18:54:42] Loaded. [18:54:42] Loading plugin: sscanf.so [18:54:42] [18:54:42] =============================== [18:54:42] sscanf plugin loaded. [18:54:42] Version: 2.8.1 [18:54:42] (c) 2012 Alex "Y_Less" Cole [18:54:42] =============================== [18:54:42] Loaded. [18:54:42] Loaded 6 plugins. [18:54:42] [18:54:42] Filterscripts [18:54:42] --------------- [18:54:42] Loaded 0 filterscripts. [18:54:42] [debug] Run time error 19: "File or function is not found" [18:54:42] [debug] cache_get_value_name [18:54:42] [debug] cache_get_value_name_int [18:54:42] [debug] Run time error 19: "File or function is not found" [18:54:42] [debug] cache_get_value_name [18:54:42] [debug] cache_get_value_name_int [18:54:42] Script[gamemodes/project.amx]: Run time error 19: "File or function is not found" [18:54:42] Number of vehicle models: 0 [18:54:42] [debug] Run time error 19: "File or function is not found" [18:54:42] [debug] cache_get_value_name [18:54:42] [debug] cache_get_value_name_int [18:54:42] [debug] Run time error 19: "File or function is not found" [18:54:42] [debug] cache_get_value_name [18:54:42] [debug] cache_get_value_name_int