ShowPlayerDialog help
#9

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
These errors are from your dialog response public.

First- The symbol 'dialogid' is not recognized.
Second- Some function is declared differently from the way it's implemented; example:
pawn Код:
forward Test(playerid,wtf);
public Test(playerid)
{
    //...
}
Will return an error because the function 'wtf' is not declared.

Third error- Remove the 'new string[256];' line. You have a string variable that you haven't used.

Show me your OnDialogResponse line.
Just wanna say thanks for helping me out your really good at helping.

Well here is my dialogresponse :
Код:
if(dialogid == 4512 && response == 1)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        for(new i = 0; i < sizeof(CarInfo); i++)
	        {
				if(CarInfo[i][ownedvehicle] == vehid)
				{
					if(PlayerInfo[playerid][pCarKey]!=0)
					{
						SendClientMessage(playerid, COLOR_GREY, "You already own a car, type /car sell if you want to buy this one!");
						return 1;
					}
					if(CarInfo[i][cOwned]==1)
					{
					    SendClientMessage(playerid, COLOR_GREY, "Someone already owns this car");
					    return 1;
					}
					if(GetPlayerMoney(playerid) >= CarInfo[i][cValue])
					{
						PlayerInfo[playerid][pCarKey] = i;
						CarInfo[i][cOwned] = 1;
						CarOffered[playerid]=0;
						GetPlayerName(playerid, sendername, sizeof(sendername));
						strmid(CarInfo[i][cOwner], sendername, 0, strlen(sendername), 999);
						GivePlayerMoney(playerid,-CarInfo[i][cValue]);
						GameTextForPlayer(playerid, "~w~Congratulations~n~This is your car until you sell it!", 5000, 3);
						SendClientMessage(playerid, COLOR_GRAD2, "Congratulations on your new purchase!");
						SendClientMessage(playerid, COLOR_GRAD2, "Type /car manual to view the car manual!");
						TogglePlayerControllable(playerid, 1);
						SaveCars();
						return 1;
					}
					else
					{
						SendClientMessage(playerid, COLOR_GREY, "   You don't have the cash for that!");
						return 1;
					}
				}
			}
		}
		return 1;
Im trying to make so when you enter a buy able car the dialog shows and you can cancel ore buy it.
it was a text on the screen before trying to make it into a dialog
Reply


Messages In This Thread
ShowPlayerDialog help - by FrankC - 24.09.2010, 16:30
Re: ShowPlayerDialog help - by HyperZ - 24.09.2010, 16:38
Re: ShowPlayerDialog help - by Kyeno - 24.09.2010, 16:43
Re: ShowPlayerDialog help - by FrankC - 24.09.2010, 16:44
Re: ShowPlayerDialog help - by [XST]O_x - 24.09.2010, 16:44
Re: ShowPlayerDialog help - by FrankC - 24.09.2010, 16:48
Re: ShowPlayerDialog help - by FrankC - 24.09.2010, 17:04
Re: ShowPlayerDialog help - by [XST]O_x - 24.09.2010, 17:15
Re: ShowPlayerDialog help - by FrankC - 24.09.2010, 17:30
Re: ShowPlayerDialog help - by [XST]O_x - 24.09.2010, 17:33

Forum Jump:


Users browsing this thread: 1 Guest(s)