Yes that is what I was referring to. I changed the last return to 0, but it did not help.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 5876:
{
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You have canceled.");
return 1;
}
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, Red, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, Blue, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, Green, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
}
case 3:
{
ShowPlayerDialog(playerid, Yellow, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
}
case 4:
{
ShowPlayerDialog(playerid, Cyan, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
}
case 5:
{
ShowPlayerDialog(playerid, Pink, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
}
case 6:
{
ShowPlayerDialog(playerid, White, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]", "Ok", "Cancel");
}
case 7:
{
ShowPlayerDialog(playerid, Black, DIALOG_STYLE_INPUT, "-=Number Plate","Enter the name [4-8 Character]", "Ok", "Cancel");
}
}
}
}
if(dialogid == Red) // 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}You must enter 4-8 Character.");
ShowPlayerDialog(playerid, Red, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
}
}
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You have canceled.");
}
}
if(dialogid == Green) // Text color Green
{
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}You must enter 4-8 Character.");
ShowPlayerDialog(playerid, Green, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
}
}
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You have canceled.");
}
}
if(dialogid == Blue) // Text color Blue
{
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}You must enter 4-8 Character.");
ShowPlayerDialog(playerid, Blue, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
}
}
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You have canceled.");
}
}
if(dialogid == Yellow) // Text color Yellow
{
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}You must enter 4-8 Character.");
ShowPlayerDialog(playerid, Yellow, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
}
}
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You have canceled.");
}
}
if(dialogid == Cyan) // Text color Cyan
{
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}You must enter 4-8 Character.");
ShowPlayerDialog(playerid, Cyan, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
}
}
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You have canceled.");
}
}
if(dialogid == Pink) // Text color Pink
{
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}You must enter 4-8 Character.");
ShowPlayerDialog(playerid, Pink, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
}
}
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You have canceled.");
}
}
if(dialogid == White) // Text color White
{
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}You must enter 4-8 Character.");
ShowPlayerDialog(playerid, White, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
}
}
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You have canceled.");
}
}
if(dialogid == Black) // Text color Black
{
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}You must enter 4-8 Character.");
ShowPlayerDialog(playerid, Black, DIALOG_STYLE_INPUT, "-=Number Plate=-","Enter the name [4-8 Character]\n{ff0000}Error: You must enter 4-8 Character", "Ok", "Cancel");
}
}
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "You have canceled.");
}
}
return 0;
}