04.04.2015, 02:05
This should work right?
But when the string is the same, it doesn't run if(exist == 1)
pawn Код:
for(new i = 0; i < sizeof(pVeh); i++)
{
if(strcmp(pVeh[i][car_Plate], string, false) == 0)
{
exist = 1;
break;
}
}
if(exist == 1)
{
ErrorMessage(playerid, "That number plate already exists on another vehicle!");
format(string, sizeof(string), "You are setting your plate for your %s. This will cost $75 and There's a few guidelines.\n\n* Can only be 34 characters long.\n* Has to be unique.\n* Any unrealistic plates seen will be changed by an admin", GetVehicleFriendlyName(SettingPlate[playerid]));
ShowPlayerDialog(playerid, DIALOG_VEH_PLATE, DIALOG_STYLE_INPUT, "Vehicle Number Plate", string, "Submit", "Cancel");
return 1;
}