24.09.2010, 16:44
ShowPlayerDialog :
Dialog respond :
Errors :
Код:
if(CarInfo[i][cOwned]==0) { TogglePlayerControllable(playerid, 0); CarOffered[playerid]=1; ShowPlayerDialog( playerid, 4512, DIALOG_STYLE_MSGBOX, "Car Menu", "Car: %s Price: %d if you want this car press buy.", "Buy", "Cancel" CarInfo[i][cDescription],CarInfo[i][cValue]); } } } } return 1;
Код:
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;
Код:
error 017: undefined symbol "dialogid" error 025: function heading differs from prototype error 001: expected token: "-string end-", but found "-identifier-" warning 215: expression has no effect warning 215: expression has no effect error 001: expected token: ";", but found ")" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line