Need Help
#1

When i enter in the vehicle and i press YES to buy and when i exit and again entering is still on buy here is FilterSCript i put on pastebin http://pastebin.com/SzBsrbMH because is tooo long to copy here and and for /avtomobil--(veh/car on english) when i click on park dont response what to do at OnDialogResponse
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new idx, /*tmp[128],*/ cmd[128];
	cmd = strtok(cmdtext, idx);
	////////////
	if(strcmp(cmdtext, "/avtomobil", true) == 0)
    {
        //if(IsPlayerInRangeOfPoint(playerid, 837.4081,-2060.8938,12.8672,179.2266))
	   {
       ShowPlayerDialog(playerid, 3304, DIALOG_STYLE_LIST, ""TPLAVA"Avtomobil", ""TPLAVA"Otkluci-Zakluci\n"BIJELA"Parkiraj\n"TPLAVA"Prodadi\n"BIJELA"Lociraj", "Odaberi", "Izlezi");
       }
	   return 1;
	}
	////////
	return 0;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 3304)
	{
	if(response)
	{
	//-------------/LOCKcars-------------
	if(listitem == 0)
	{
	if(gPlayerHasCar[playerid] == 1)
	{
    new veh, Float:vehx, Float:vehy, Float:vehz;
	veh = Vehicle[playerid];
	GetVehiclePos(veh, vehx, vehy, vehz);
	if(IsPlayerInRangeOfPoint(playerid, 3.0, vehx, vehy, vehz))
	{
    if(VehicleInfo[playerid][Locked] == 0)
    {
	SetVehicleParamsForPlayer(veh, playerid, 0, 1);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
	GameTextForPlayer(playerid, "~r~Avtomobil zaklucen!", 3000, 3);
	VehicleInfo[playerid][Locked] = 1;
	gVehLocked[v] = 1;
	return 1;
	}
	if(VehicleInfo[playerid][Locked] == 1)
    {
	SetVehicleParamsForPlayer(veh, playerid, 0, 0);
	PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
	GameTextForPlayer(playerid, "~g~Avtomobil otklucen!", 3000, 3);
	VehicleInfo[playerid][Locked] = 0;
	gVehLocked[v] = 0;
	return 1;
	}
	}
	else
	{
    SendClientMessage(playerid, 0xAFAFAFAA, ""INFOBOJA"INFO: "BIJELA"Ne ste do vasiot avtomobil.");
    return 1;
   	}
	}
	else
	{
    SendClientMessage(playerid, 0xAFAFAFAA, ""INFOBOJA"INFO: "BIJELA"Vie neposeduvate Avtomobil.");
	}
	return 1;
	}
    if(listitem == 1)
	{
	new Float:X, Float:Y, Float:Z, Float:Rot;
	if(!IsPlayerInVehicle(playerid, Vehicle[playerid]))
	{
	SendClientMessage(playerid, 0xFFFFFFAA, ""INFOBOJA"INFO: "BIJELA"Ne ste vo vasiot avtomobil.");
	return 1;
	}
	new file[256], name[24];
	GetPlayerName(playerid, name, 24);
	format(file,sizeof(file),"Cars/%s.ini",name);
    dini_IntSet(file, "Model", VehicleInfo[playerid][Model]);
	dini_IntSet(file, "Price", VehicleInfo[playerid][Price]);
	dini_FloatSet(file, "X", VehicleInfo[playerid][CarX]);
	dini_FloatSet(file, "Y", VehicleInfo[playerid][CarY]);
	dini_FloatSet(file, "Z", VehicleInfo[playerid][CarZ]);
	dini_FloatSet(file, "Rot", VehicleInfo[playerid][CarRot]);
	dini_IntSet(file, "Locked", VehicleInfo[playerid][Locked]);
	dini_IntSet(file, "paintjob", VehicleInfo[playerid][paintjob]);
	dini_IntSet(file, "color1", VehicleInfo[playerid][colora]);
	dini_IntSet(file, "color1", VehicleInfo[playerid][colorb]);
	SendClientMessage(playerid, 0xFFFF00FF, ""INFOBOJA"INFO: "BIJELA"Go parkiravte vasiot avtomobil na ovoa mesto.");
	GetVehiclePos(Vehicle[playerid], X, Y, Z);
	GetVehicleZAngle(Vehicle[playerid], Rot);
	VehicleInfo[playerid][Model] = GetVehicleModel(playerid);
	VehicleInfo[playerid][CarX] = X;
	VehicleInfo[playerid][CarY] = Y;
	VehicleInfo[playerid][CarZ] = Z;
	VehicleInfo[playerid][CarRot] = Rot;
	return 1;
	}
	if(listitem == 2)
	{
    if(IsPlayerConnected(playerid))
    {
    if(!IsPlayerInVehicle(playerid, Vehicle[playerid]))
    {
   	SendClientMessage(playerid, 0xFFFFFFAA, ""INFOBOJA"INFO: "BIJELA"Ne ste vo vasiot avtomobil.");
	}
	if(ConfirmSale[playerid] == 0) {
	//SendClientMessage(playerid, 0xFFFF00FF, "Jeste li sigutni da zelite prodati biciklu (Koristi /prodajcars jos jednom da ga prodas).");
	ConfirmSale[playerid] = 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)