Јануари 23, 2020, 12:51:40 am

Автор Тема: [Давам]-FS-/tablicki  (Прочитано 52 пати)

0 Членови и 1 гостин ја прегледуваат оваа тема.

Отсутен DorneliusAlfredKennecton

  • Почетник
  • *
  • Пораки: 130
  • Популарност: +0/-2
[Давам]-FS-/tablicki
« на: Јануари 14, 2020, 04:14:11 pm »
Име и презиме на сервер:Dornelius Kennecton
Детално за скрипта:Таблички на возилата да пишува ваш текст со боја
Слика/видео:https://imgur.com/a/Y24dQEZ
Кодови од скрипта:Во коментар

Отсутен DorneliusAlfredKennecton

  • Почетник
  • *
  • Пораки: 130
  • Популарност: +0/-2
Одг: [Давам]-FS-/tablicki
« Одговори #1 на: Јануари 14, 2020, 04:17:19 pm »
//============================================================================//
// Simple number plate system with color                                      //
// Created By: Kids™                                                       //
//============================================================================//

#include <a_samp>
#pragma tabsize 0
#define COLOR_Red   0xE60000FF
#define Crveno      5877
#define Sino      5878
#define Zeleno      5879
#define Zolto      5880
#define Sivo      5881
#define Rozevo      5882
#define Belo      5883
#define Crno      5884

new string[128];
new VehicleId;
new Float:X,Float:Y,Float:Z,Float:Angle;

public OnFilterScriptInit()
{
   print("\n----------------------------------------------");
   print("* Number plate system with color By:Kids     *");
   print("*              Load Succesfully              *");
   print("----------------------------------------------\n");
   return 1;
}

public OnFilterScriptExit()
{
    print("\n----------------------------------------------");
   print("* Number plate system with color By: Kids    *");
   print("*             Unload Succesfully             *");
   print("----------------------------------------------\n");
   return 1;
}



public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/tablicki", true)==0)
   {
      if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_Red, "Error: {FFFFFF}Treba da si u kola da ja koristis komadava!");
      else
      {
          ShowPlayerDialog(playerid, 5876, DIALOG_STYLE_LIST, "-=Izberi Boja=-", "{FF0000}Red\n{00FF00}Zeleno\n{0000FF}Sino\n{FFFF00}Zolto\n{00FFFF}Sivo\n{FF00FF}Rozavo\n{F0F0F0}Belo\n{0F0F0F}Crno", "Ok", "Cancel");
      }
      return 1;
   }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 5876:
        {
            if(!response)
            {
                    SendClientMessage(playerid, COLOR_Red, "Izlegovte.");
                    return 1;
            }

            switch(listitem)
            {
                case 0:
            {
                ShowPlayerDialog(playerid, Crveno, DIALOG_STYLE_INPUT, "-=Number Plate=-","Vnesi ime[4-8 Karakteri]", "Ok", "Cancel");
            }
            case 1:
            {
                ShowPlayerDialog(playerid, Sino, DIALOG_STYLE_INPUT, "-=Number Plate=-","Vnesi ime [4-8 Karakteri]", "Ok", "Cancel");
            }
            case 2:
            {
               ShowPlayerDialog(playerid, Zeleno, DIALOG_STYLE_INPUT, "-=Number Plate=-","Vnesi ime [4-8 Karakteri]", "Ok", "Cancel");
            }
            case 3:
            {
               ShowPlayerDialog(playerid, Zolto, DIALOG_STYLE_INPUT, "-=Number Plate=-","Vnesi ime [4-8 Karakteri]", "Ok", "Cancel");
            }
            case 4:
            {
               ShowPlayerDialog(playerid, Sivo, DIALOG_STYLE_INPUT, "-=Number Plate=-","Vnesi ime[4-8 Karakteri]", "Ok", "Cancel");
            }
            case 5:
            {
               ShowPlayerDialog(playerid, Rozevo, DIALOG_STYLE_INPUT, "-=Number Plate=-","Vnesi ime[4-8 Karakteri]", "Ok", "Cancel");
            }
            case 6:
            {
               ShowPlayerDialog(playerid, Belo, DIALOG_STYLE_INPUT, "-=Number Plate=-","Vnesi ime [4-8 Karakteri]", "Ok", "Cancel");
            }
            case 7:
            {
               ShowPlayerDialog(playerid, Crno, DIALOG_STYLE_INPUT, "-=Number Plate","Vnesi ime [4-8 Karakteri]", "Ok", "Cancel");
            }
         }
      }
   }
   if(dialogid == Crveno) // Text color Red
   {
         if(response)
      {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{FF0000}%s",inputtext);
               VehicleId = GetPlayerVehicleID(playerid);
               GetPlayerPos(playerid,X,Y,Z);
               GetVehicleZAngle(VehicleId,Angle);
                 SetVehicleNumberPlate(VehicleId,string);
            SetVehicleToRespawn(VehicleId);
            SetVehiclePos(VehicleId,X,Y,Z);
            PutPlayerInVehicle(playerid,VehicleId,0);
            SetVehicleZAngle(VehicleId,Angle);
            SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_Red, "Error: {ffffff}Treba da vneses 4-8 Karakteri.");
                ShowPlayerDialog(playerid, Crveno, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Karakteri]\n{ff0000}Error: Treba da vneses 4-8 Karakteri", "Ok", "Cancel");
         }
         }
         if(!response)
         {
             SendClientMessage(playerid, COLOR_Red, "Izlegovte.");
      }
   }
   if(dialogid == Zeleno) // Text color Zeleno
   {
         if(response)
      {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{0000FF}%s",inputtext);
               VehicleId = GetPlayerVehicleID(playerid);
               GetPlayerPos(playerid,X,Y,Z);
               GetVehicleZAngle(VehicleId,Angle);
                 SetVehicleNumberPlate(VehicleId,string);
            SetVehicleToRespawn(VehicleId);
            SetVehiclePos(VehicleId,X,Y,Z);
            PutPlayerInVehicle(playerid,VehicleId,0);
            SetVehicleZAngle(VehicleId,Angle);
            SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_Red, "Error: {ffffff}Treba da vneses 4-8 Karakteri.");
                ShowPlayerDialog(playerid, Zeleno, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Karakteri]\n{ff0000}Error: Treba da vneses 4-8 Karakteri", "Ok", "Cancel");
         }
         }
         if(!response)
         {
             SendClientMessage(playerid, COLOR_Red, "Izlegovte.");
      }
   }
   if(dialogid == Sino) // Text color Sino
   {
         if(response)
      {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{00FF00}%s",inputtext);
               VehicleId = GetPlayerVehicleID(playerid);
               GetPlayerPos(playerid,X,Y,Z);
               GetVehicleZAngle(VehicleId,Angle);
                 SetVehicleNumberPlate(VehicleId,string);
            SetVehicleToRespawn(VehicleId);
            SetVehiclePos(VehicleId,X,Y,Z);
            PutPlayerInVehicle(playerid,VehicleId,0);
            SetVehicleZAngle(VehicleId,Angle);
            SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_Red, "Error: {ffffff}Treba da vneses 4-8 Karakteri.");
                ShowPlayerDialog(playerid, Sino, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Karakteri]\n{ff0000}Error: Treba da vneses 4-8 Karakteri", "Ok", "Cancel");
         }
         }
         if(!response)
         {
             SendClientMessage(playerid, COLOR_Red, "Izlegovte.");
      }
   }
   if(dialogid == Zolto) // Text color Zolto
   {
         if(response)
      {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{FFFF00}%s",inputtext);
               VehicleId = GetPlayerVehicleID(playerid);
               GetPlayerPos(playerid,X,Y,Z);
               GetVehicleZAngle(VehicleId,Angle);
                 SetVehicleNumberPlate(VehicleId,string);
            SetVehicleToRespawn(VehicleId);
            SetVehiclePos(VehicleId,X,Y,Z);
            PutPlayerInVehicle(playerid,VehicleId,0);
            SetVehicleZAngle(VehicleId,Angle);
            SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_Red, "Error: {ffffff}Treba da vneses 4-8 Karakteri.");
                ShowPlayerDialog(playerid, Zolto, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Karakteri]\n{ff0000}Error: Treba da vneses 4-8 Karakteri", "Ok", "Cancel");
         }
         }
         if(!response)
         {
             SendClientMessage(playerid, COLOR_Red, "Izlegovte.");
      }
   }
   if(dialogid == Sivo) // Text color Sivo
   {
         if(response)
      {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{00FFFF}%s",inputtext);
               VehicleId = GetPlayerVehicleID(playerid);
               GetPlayerPos(playerid,X,Y,Z);
               GetVehicleZAngle(VehicleId,Angle);
                 SetVehicleNumberPlate(VehicleId,string);
            SetVehicleToRespawn(VehicleId);
            SetVehiclePos(VehicleId,X,Y,Z);
            PutPlayerInVehicle(playerid,VehicleId,0);
            SetVehicleZAngle(VehicleId,Angle);
            SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_Red, "Error: {ffffff}Treba da vneses 4-8 Karakteri.");
                ShowPlayerDialog(playerid, Sivo, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Karakteri]\n{ff0000}Error: Treba da vneses 4-8 Karakteri", "Ok", "Cancel");
         }
         }
         if(!response)
         {
             SendClientMessage(playerid, COLOR_Red, "Izlegovte.");
      }
   }
   if(dialogid == Rozevo) // Text color Rozevo
   {
         if(response)
      {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{FF00FF}%s",inputtext);
               VehicleId = GetPlayerVehicleID(playerid);
               GetPlayerPos(playerid,X,Y,Z);
               GetVehicleZAngle(VehicleId,Angle);
                 SetVehicleNumberPlate(VehicleId,string);
            SetVehicleToRespawn(VehicleId);
            SetVehiclePos(VehicleId,X,Y,Z);
            PutPlayerInVehicle(playerid,VehicleId,0);
            SetVehicleZAngle(VehicleId,Angle);
            SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_Red, "Error: {ffffff}Treba da vneses 4-8 Karakteri.");
                ShowPlayerDialog(playerid, Rozevo, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Karakteri]\n{ff0000}Error: Treba da vneses 4-8 Karakteri", "Ok", "Cancel");
         }
         }
         if(!response)
         {
             SendClientMessage(playerid, COLOR_Red, "Izlegovte.");
      }
   }
   if(dialogid == Belo) // Text color Belo
   {
         if(response)
      {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{F0F0F0}%s",inputtext);
               VehicleId = GetPlayerVehicleID(playerid);
               GetPlayerPos(playerid,X,Y,Z);
               GetVehicleZAngle(VehicleId,Angle);
                 SetVehicleNumberPlate(VehicleId,string);
            SetVehicleToRespawn(VehicleId);
            SetVehiclePos(VehicleId,X,Y,Z);
            PutPlayerInVehicle(playerid,VehicleId,0);
            SetVehicleZAngle(VehicleId,Angle);
            SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_Red, "Error: {ffffff}Treba da vneses 4-8 Karakteri.");
                ShowPlayerDialog(playerid, Belo, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Karakteri]\n{ff0000}Error: Treba da vneses 4-8 Karakteri", "Ok", "Cancel");
         }
         }
         if(!response)
         {
             SendClientMessage(playerid, COLOR_Red, "Izlegovte.");
      }
   }
   if(dialogid == Crno) // Text color Crno
   {
         if(response)
      {
            if(strlen(inputtext) > 3 && strlen(inputtext) < 9)
            {
                format(string,sizeof(string),"{0F0F0F}%s",inputtext);
               VehicleId = GetPlayerVehicleID(playerid);
               GetPlayerPos(playerid,X,Y,Z);
               GetVehicleZAngle(VehicleId,Angle);
                 SetVehicleNumberPlate(VehicleId,string);
            SetVehicleToRespawn(VehicleId);
            SetVehiclePos(VehicleId,X,Y,Z);
            PutPlayerInVehicle(playerid,VehicleId,0);
            SetVehicleZAngle(VehicleId,Angle);
            SetCameraBehindPlayer(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_Red, "Error: {ffffff}Treba da vneses 4-8 Karakteri.");
                ShowPlayerDialog(playerid, Crno, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Karakteri]\n{ff0000}Error: Treba da vneses 4-8 Karakteri", "Ok", "Cancel");
         }
         }
         if(!response)
         {
             SendClientMessage(playerid, COLOR_Red, "Izlegovte.");
      }
   }
   return 1;
}

//============================================================================//                                                               //
//============================================================================//
// © Dornelius Kennnecton                                                     //
//============================================================================//

Отсутен Back Jacke

  • Leader
  • Наш човек
  • *
  • Пораки: 335
  • Популарност: +6/-6
  • Learner in C programing
  • Nick на сервер: Back_Jacke
Одг: [Давам]-FS-/tablicki
« Одговори #2 на: Јануари 14, 2020, 10:42:56 pm »
Одлично е изработена .
Една замерка а тоа е кодот да биде на пастербин или како фајл уплоад .

Отсутен DorneliusAlfredKennecton

  • Почетник
  • *
  • Пораки: 130
  • Популарност: +0/-2
Одг: [Давам]-FS-/tablicki
« Одговори #3 на: Јануари 14, 2020, 11:36:25 pm »
Одлично е изработена .
Една замерка а тоа е кодот да биде на пастербин или како фајл уплоад .

До душа не е целосно моја ама фала и нареден пат ке користам PASTEBIN

Отсутен Brendon Burchard

  • Moderator
  • Почетник
  • *
  • Пораки: 20
  • Популарност: +0/-0
  • Rest in peace.
Одг: [Давам]-FS-/tablicki
« Одговори #4 на: Јануари 17, 2020, 10:35:50 pm »
Следен пат кодот во пастебин да не дојди до истава ситоација да пишуваш 2 пораки за глупости.
Доволно дискусија.

-Катанче.