Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================================================================//
- // Simple Numar de imatriculare system with color //
- // Created By: Moshaki™ //
- //============================================================================//
- #include <a_samp>
- #pragma tabsize 0
- #define COLOR_RED 0xE60000FF
- #define Red 5877
- #define Blue 5878
- #define Green 5879
- #define Yellow 5880
- #define Cyan 5881
- #define Pink 5882
- #define White 5883
- #define Black 5884
- new string[128];
- new VehicleId;
- new Float:X,Float:Y,Float:Z,Float:Angle;
- new Actorndi;
- public OnFilterScriptInit()
- {
- print("\n----------------------------------------------");
- print("* Numar de imatriculare system with color By: Moshaki *");
- print("* Load Succesfully *");
- print("----------------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n----------------------------------------------");
- print("* Numar de imatriculare system with color By: Moshaki *");
- print("* Unload Succesfully *");
- print("----------------------------------------------\n");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/gotocarplate", true) == 0)
- {
- if (!IsPlayerAdmin(playerid)) return 0;
- SetPlayerPos(playerid, 1078.6296, 1787.4169, 10.8203);
- return 1;
- }
- if (strcmp(cmdtext, "/carplate", true)==0)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 1.0, 1088.4783, 1795.0315, 10.8203)) return SendClientMessage(playerid, -1, "You are not in the school of number registration to the car,type gps.");
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in the car!");
- else
- {
- ShowPlayerDialog(playerid, 5876, DIALOG_STYLE_LIST, "-=Select Color=-", "{FF0000}Red\n{00FF00}Green\n{0000FF}Blue\n{FFFF00}Yellow\n{00FFFF}Cyan\n{FF00FF}Pink\n{F0F0F0}White\n{0F0F0F}Black", "Ok", "Cancel");
- }
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case 5876:
- {
- if(!response)
- {
- SendClientMessage(playerid, COLOR_RED, "You has canceled.");
- return 1;
- }
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, Red, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]", "Ok", "Cancel");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, Blue, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]", "Ok", "Cancel");
- }
- case 2:
- {
- ShowPlayerDialog(playerid, Green, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]", "Ok", "Cancel");
- }
- case 3:
- {
- ShowPlayerDialog(playerid, Yellow, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]", "Ok", "Cancel");
- }
- case 4:
- {
- ShowPlayerDialog(playerid, Cyan, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]", "Ok", "Cancel");
- }
- case 5:
- {
- ShowPlayerDialog(playerid, Pink, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]", "Ok", "Cancel");
- }
- case 6:
- {
- ShowPlayerDialog(playerid, White, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]", "Ok", "Cancel");
- }
- case 7:
- {
- ShowPlayerDialog(playerid, Black, DIALOG_STYLE_INPUT, "-=Numar de imatriculare","Enter the name [2-8 Character]", "Ok", "Cancel");
- }
- }
- }
- }
- if(dialogid == Red) // Text color red
- {
- if(response)
- {
- if(strlen(inputtext) > 1 && 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);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, 0xB6CAD1, "Ai platit $.5000 pentru numarul de imatriculare!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 2-8 Character.");
- ShowPlayerDialog(playerid, Red, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]\n{ff0000}Error: You must enter 2-8 Character", "Ok", "Cancel");
- }
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_RED, "You has canceled.");
- }
- }
- if(dialogid == Green) // Text color Green
- {
- if(response)
- {
- if(strlen(inputtext) > 1 && 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);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, 0xB6CAD1, "Ai platit $.5000 pentru numarul de imatriculare!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 2-8 Character.");
- ShowPlayerDialog(playerid, Green, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]\n{ff0000}Error: You must enter 2-8 Character", "Ok", "Cancel");
- }
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_RED, "You has canceled.");
- }
- }
- if(dialogid == Blue) // Text color Blue
- {
- if(response)
- {
- if(strlen(inputtext) > 1 && 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);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, 0xB6CAD1, "Ai platit $.5000 pentru numarul de imatriculare!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 2-8 Character.");
- ShowPlayerDialog(playerid, Blue, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]\n{ff0000}Error: You must enter 2-8 Character", "Ok", "Cancel");
- }
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_RED, "You has canceled.");
- }
- }
- if(dialogid == Yellow) // Text color Yellow
- {
- if(response)
- {
- if(strlen(inputtext) > 1 && 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);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, 0xB6CAD1, "Ai platit $.5000 pentru numarul de imatriculare!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 2-8 Character.");
- ShowPlayerDialog(playerid, Yellow, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]\n{ff0000}Error: You must enter 2-8 Character", "Ok", "Cancel");
- }
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_RED, "You has canceled.");
- }
- }
- if(dialogid == Cyan) // Text color Cyan
- {
- if(response)
- {
- if(strlen(inputtext) > 1 && 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);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, 0xB6CAD1, "Ai platit $.5000 pentru numarul de imatriculare!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 2-8 Character.");
- ShowPlayerDialog(playerid, Cyan, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]\n{ff0000}Error: You must enter 2-8 Character", "Ok", "Cancel");
- }
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_RED, "You has canceled.");
- }
- }
- if(dialogid == Pink) // Text color Pink
- {
- if(response)
- {
- if(strlen(inputtext) > 1 && 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);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, 0xB6CAD1, "Ai platit $.5000 pentru numarul de imatriculare!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 2-8 Character.");
- ShowPlayerDialog(playerid, Pink, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]\n{ff0000}Error: You must enter 2-8 Character", "Ok", "Cancel");
- }
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_RED, "You has canceled.");
- }
- }
- if(dialogid == White) // Text color White
- {
- if(response)
- {
- if(strlen(inputtext) > 1 && 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);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, 0xB6CAD1, "Ai platit $.5000 pentru numarul de imatriculare!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 2-8 Character.");
- ShowPlayerDialog(playerid, White, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]\n{ff0000}Error: You must enter 2-8 Character", "Ok", "Cancel");
- }
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_RED, "You has canceled.");
- }
- }
- if(dialogid == Black) // Text color Black
- {
- if(response)
- {
- if(strlen(inputtext) > 1 && 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);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, 0xB6CAD1, "Ai platit $.5000 pentru numarul de imatriculare!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Error: {ffffff}You must enter 2-8 Character.");
- ShowPlayerDialog(playerid, Black, DIALOG_STYLE_INPUT, "-=Numar de imatriculare=-","Enter the name [2-8 Character]\n{ff0000}Error: You must enter 2-8 Character", "Ok", "Cancel");
- }
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_RED, "You has canceled.");
- }
- }
- return 1;
- }
- public OnGameModeInit()
- {
- CreateObject(16385, 1099.6, 1783, 9.3, 0, 0, 0); // ?????? 0
- CreateObject(3379, 1116, 1794.8, 9.8, 0, 0, 270); // ?????? 1
- CreateObject(8557, 1114.2, 1743.3, 11.3, 0, 0, 270); // ?????? 2
- CreateObject(3934, 1029.2, 1784.4, 9.9, 0, 0, 0); // ?????? 3
- CreateObject(1238, 1115, 1795.4, 10.1, 0, 0, 0); // ?????? 4
- CreateObject(1238, 1114.3, 1796.1, 10.1, 0, 0, 0); // ?????? 5
- CreateObject(1238, 1113.6, 1796.8, 10.1, 0, 0, 0); // ?????? 6
- CreateObject(1238, 1112.7, 1797.3, 10.1, 0, 0, 0); // ?????? 7
- CreateObject(1238, 1111.6, 1798, 10.1, 0, 0, 0); // ?????? 8
- CreateObject(1238, 1110.7, 1798.5, 10.1, 0, 0, 0); // ?????? 9
- CreateObject(1238, 1109.8, 1798.7, 10.1, 0, 0, 0); // ?????? 10
- CreateObject(988, 1097, 1794.9, 9, 0, 0, 270); // ?????? 11
- CreateVehicle(405, 1113, 1742.7, 10.8, 90, -1, -1, 3600); // ????????? 0
- CreateVehicle(405, 1112.8, 1739.4, 10.8, 90, -1, -1, 3600); // ????????? 1
- CreateVehicle(405, 1113, 1736.2, 10.8, 90, -1, -1, 3600); // ????????? 2
- CreateVehicle(426, 1113.1, 1732.7, 10.6, 90, -1, -1, 3600); // ????????? 3
- CreateVehicle(426, 1113.2, 1729.4, 10.6, 90, -1, -1, 3600); // ????????? 4
- CreateVehicle(426, 1113.2, 1725.7, 10.6, 90, -1, -1, 3600); // ????????? 5
- CreateVehicle(405, 1113.2, 1751.6, 10.8, 90, -1, -1, 3600); // ????????? 6
- Actorndi = CreateActor(240, 1089.8536, 1772.5526, 10.8203, 84.2393);
- ApplyActorAnimation(Actorndi, "DEALER", "shop_pay", 4.1, 0, 0, 0, 0, 0); // ???????? ??????
- Create3DTextLabel("Usage /carplate to buy a number car", 0x73AABA, 1088.4783, 1795.0315, 10.8203, 40.0, 0, 0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment