SA-MP Forums Archive
please help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: please help (/showthread.php?tid=512156)



please help - salev13 - 09.05.2014

I did carshop and thats didnt sell me he car
and in the dialog thats dosent show me all the cars
please help me and told me what to do to fix it please...

this is the FS:

http://pastebin.com/uyMVF0PA

please fix it


Re: please help - AndySedeyn - 09.05.2014

OnDialog Response should return 0;

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == DIALOG_CAR)
        {
            if(!response) return 0;
                if(DOF2_GetBool(VehicleFile(playerid), "VehicleHave")) return SendClientMessage(playerid, 0xFF0000FF, ".чййн лбш шлб ббтмеък");
                DOF2_CreateFile(VehicleFile(playerid));
                if(FAC_GetPlayerMoney(playerid) < PlayerData[listitem][vehicle_Price]) return SendClientMessage(playerid, 0xFF0000FF, ".айп бйгк аъ длсу дгшещ");
                FAC_GivePlayerMoney(playerid, -PlayerData[listitem][vehicle_Price]);
                DOF2_SetString(VehicleFile(playerid), "VehicleName", PlayerData[listitem][vehicle_Name]);
                DOF2_SetInt(VehicleFile(playerid), "VehiclePrice", PlayerData[listitem][vehicle_Price]);
                DOF2_SetInt(VehicleFile(playerid), "VehicleModel", PlayerData[listitem][vehicle_ID]);
                DOF2_SetBool(VehicleFile(playerid), "VehicleHave", true);
                DOF2_SaveFile();
                SendClientMessage(playerid, 0xFFFF00FF, ".ожм иеб, лтъ йщ ббтмеък шлб");
                return 1;
        }
        return 0;
}
I'm at school now but I'll take a better look when I get home.


Re: please help - salev13 - 09.05.2014

Quote:
Originally Posted by Bible
Посмотреть сообщение
OnDialog Response should return 0;

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == DIALOG_CAR)
        {
            if(!response) return 0;
                if(DOF2_GetBool(VehicleFile(playerid), "VehicleHave")) return SendClientMessage(playerid, 0xFF0000FF, ".чййн лбш шлб ббтмеък");
                DOF2_CreateFile(VehicleFile(playerid));
                if(FAC_GetPlayerMoney(playerid) < PlayerData[listitem][vehicle_Price]) return SendClientMessage(playerid, 0xFF0000FF, ".айп бйгк аъ длсу дгшещ");
                FAC_GivePlayerMoney(playerid, -PlayerData[listitem][vehicle_Price]);
                DOF2_SetString(VehicleFile(playerid), "VehicleName", PlayerData[listitem][vehicle_Name]);
                DOF2_SetInt(VehicleFile(playerid), "VehiclePrice", PlayerData[listitem][vehicle_Price]);
                DOF2_SetInt(VehicleFile(playerid), "VehicleModel", PlayerData[listitem][vehicle_ID]);
                DOF2_SetBool(VehicleFile(playerid), "VehicleHave", true);
                DOF2_SaveFile();
                SendClientMessage(playerid, 0xFFFF00FF, ".ожм иеб, лтъ йщ ббтмеък шлб");
                return 1;
        }
        return 0;
}
I'm at school now but I'll take a better look when I get home.
when you are at home told me the better one okay?

and this is will sell me the car?