15.11.2013, 15:04
(
Последний раз редактировалось teomakedonija; 15.11.2013 в 15:42.
)
pawn Код:
if(dialogid == 16001)
{
if(response)
{
if(listitem == 0)
{
if(model == 499 || model == 422 || model == 482 || model == 498 || model == 609 || model == 524 ||
model == 578 || model == 455 || model == 403 || model == 414 || model == 582 || model == 443 ||
model == 514 || model == 600 || model == 413 || model == 515 || model == 543 || model == 605 ||
model == 459 || model == 531 || model == 408 || model == 552 || model == 478 || model == 456 ||
model == 406 || model == 407 || model == 416 || model == 428 || model == 427 || model == 431 ||
model == 432 || model == 433 || model == 416 || model == 437 || model == 443 || model == 444 || model == 411)
{
ShowPlayerDialog(playerid, 16002, DIALOG_STYLE_INPUT,"Gorivo","Napisete kolku litri nafta sakate da stavite vo vaseto vozilo !\nCena: $10/litar","OK","Iskluci");
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"{FF4040}GRESKA: {FFFFFF}Vaseto vozilo ne koristi nafta !");
ShowPlayerDialog(playerid, 16001, DIALOG_STYLE_LIST,"Gorivo","Nafta [$10]\nBenzin [$7]\nPlin [$5]","OK","Close");
}
}
if(listitem == 1)
{
if(model == 571 || model == 468 || model == 586 || model == 463 || model == 523 || model == 521 ||
model == 554 || model == 400 || model == 402 || model == 405 || model == 409 || model == 511 ||
model == 415 || model == 421 || model == 426 || model == 429 || model == 434 || model == 435 ||
model == 602 || model == 496 || model == 589 || model == 587 || model == 565 || model == 494 ||
model == 502 || model == 503 || model == 559 || model == 603 || model == 475 || model == 506 ||
model == 451 || model == 558 || model == 477 || model == 504 || model == 401 || model == 518 ||
model == 527 || model == 542 || model == 507 || model == 562 || model == 585 || model == 419 ||
model == 526 || model == 604 || model == 466 || model == 560 || model == 550 || model == 568 ||
model == 573 || model == 579 || model == 556 || model == 557 || model == 470 || model == 489 ||
model == 505 || model == 495 || model == 462 || model == 448 || model == 581 || model == 522 ||
model == 436 || model == 461)
{
ShowPlayerDialog(playerid, 16003, DIALOG_STYLE_INPUT,"Gorivo","Napisete kolku litri benzin sakate da stavite vo vaseto vozilo !\nCena: $7/litar","OK","Iskluci");
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"{FF4040}GRESKA: {FFFFFF}Vaseto vozilo ne koristi benzin !");
ShowPlayerDialog(playerid, 16001, DIALOG_STYLE_LIST,"Gorivo","Nafta [$10]\nBenzin [$7]\nPlin [$5]","OK","Close");
}
}
if(listitem == 2)
{
if(model == 404 || model == 510 || model == 412 || model == 419 || model == 420 || model == 423 ||
model == 424 || model == 438 || model == 439 || model == 440 || model == 442 || model == 445 ||
model == 536 || model == 575 || model == 534 || model == 567 || model == 535 || model == 566 ||
model == 576 || model == 512 || model == 492 || model == 474 || model == 546 || model == 517 ||
model == 410 || model == 551 || model == 516 || model == 467 || model == 426 || model == 436 ||
model == 547 || model == 405 || model == 580 || model == 549 || model == 540 || model == 491 ||
model == 529 || model == 421 || model == 458 || model == 479 || model == 418 || model == 561 ||
model == 480 || model == 533 || model == 555 || model == 439)
{
ShowPlayerDialog(playerid, 16004, DIALOG_STYLE_INPUT,"Gorivo","Napisete kolku litri plin sakate da stavite vo vaseto vozilo !\nCena: $5/litar","OK","Iskluci");
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"{FF4040}GRESKA: {FFFFFF}Vaseto vozilo ne koristi plin !");
ShowPlayerDialog(playerid, 16001, DIALOG_STYLE_LIST,"Gorivo","Nafta [$10]\nBenzin [$7]\nPlin [$5]","OK","Close");
}
}
}
}
if(dialogid == 16002)
{
new string[256];
new VID = GetPlayerVehicleID(playerid);
new vpisanilitri = strval(inputtext);
new plakjanje = vpisanilitri * 10;
new FillUp;
FillUp = vpisanilitri;
new ostanatogorivo = 100 - Gas[VID];
if(strval(inputtext) <= 0) return SendClientMessage(playerid, COLOR_RED,"{FF4040}GRESKA: {FFFFFF}Nemozete da stavite pomalku od 0 litri gorivo !");
if(vpisanilitri > ostanatogorivo) return SendClientMessage(playerid, COLOR_RED,"{FF4040}GRESKA: {FFFFFF}Vasiot rezervoar sobira samo 100 litri gorivo !");
if(GetPlayerMoney(playerid) >= plakjanje)
{
if(IsACopCar(VID) || IsAnAmbulance(VID) || NRCar(VID))
{
Gas[VID] += FillUp;
format(string,sizeof(string),"{739EFA}* Voziloto e napolneto za $%d.",plakjanje);
SendClientMessage(playerid,COLOR_WHITE,string);
GameTextForPlayer(playerid, "~w~Upravata plati za gorivoto.", 5000, 1);
TogglePlayerControllable(playerid, 1);
}
else
{
Gas[VID] += FillUp;
format(string,sizeof(string),"{739EFA}* Voziloto e napolneto za $%d.",plakjanje);
SendClientMessage(playerid,COLOR_WHITE,string);
GivePlayerMoney(playerid, -plakjanje);
TogglePlayerControllable(playerid, 1);
}
}
else
{
format(string,sizeof(string),"{FF4040}GRESKA: {FFFFFF}Nemate dovolno pari za gorivo, smetkata e $%d.",plakjanje);
SendClientMessage(playerid,COLOR_WHITE,string);
TogglePlayerControllable(playerid, 1);
}
}
if(dialogid == 16003)
{
new string[256];
new VID = GetPlayerVehicleID(playerid);
new vpisanilitri = strval(inputtext);
new plakjanje = vpisanilitri * 7;
new FillUp;
FillUp = vpisanilitri;
new ostanatogorivo = 100 - Gas[VID];
if(strval(inputtext) <= 0) return SendClientMessage(playerid, COLOR_RED,"{FF4040}GRESKA: {FFFFFF}Nemozete da stavite pomalku od 0 litri gorivo !");
if(vpisanilitri > ostanatogorivo) return SendClientMessage(playerid, COLOR_RED,"{FF4040}GRESKA: {FFFFFF}Vasiot rezervoar sobira samo 100 litri gorivo !");
if(GetPlayerMoney(playerid) >= plakjanje)
{
if(IsACopCar(VID) || IsAnAmbulance(VID) || NRCar(VID))
{
Gas[VID] += FillUp;
format(string,sizeof(string),"{739EFA}* Voziloto e napolneto za $%d.",plakjanje);
SendClientMessage(playerid,COLOR_WHITE,string);
GameTextForPlayer(playerid, "~w~Upravata plati za gorivoto.", 5000, 1);
TogglePlayerControllable(playerid, 1);
}
else
{
Gas[VID] += FillUp;
format(string,sizeof(string),"{739EFA}* Voziloto e napolneto za $%d.",plakjanje);
SendClientMessage(playerid,COLOR_WHITE,string);
GivePlayerMoney(playerid, -plakjanje);
TogglePlayerControllable(playerid, 1);
}
}
else
{
format(string,sizeof(string),"{FF4040}GRESKA: {FFFFFF}Nemate dovolno pari za gorivo, smetkata e $%d.",plakjanje);
SendClientMessage(playerid,COLOR_WHITE,string);
TogglePlayerControllable(playerid, 1);
}
}
if(dialogid == 16004)
{
new string[256];
new VID = GetPlayerVehicleID(playerid);
new vpisanilitri = strval(inputtext);
new plakjanje = vpisanilitri * 10;
new FillUp;
FillUp = vpisanilitri;
new ostanatogorivo = 100 - Gas[VID];
if(strval(inputtext) <= 0) return SendClientMessage(playerid, COLOR_RED,"{FF4040}GRESKA: {FFFFFF}Nemozete da stavite pomalku od 0 litri gorivo !");
if(vpisanilitri > ostanatogorivo) return SendClientMessage(playerid, COLOR_RED,"{FF4040}GRESKA: {FFFFFF}Vasiot rezervoar sobira samo 100 litri gorivo !");
if(GetPlayerMoney(playerid) >= plakjanje)
{
if(IsACopCar(VID) || IsAnAmbulance(VID) || NRCar(VID))
{
Gas[VID] += FillUp;
format(string,sizeof(string),"{739EFA}* Voziloto e napolneto za $%d.",plakjanje);
SendClientMessage(playerid,COLOR_WHITE,string);
GameTextForPlayer(playerid, "~w~Upravata plati za gorivoto.", 5000, 1);
TogglePlayerControllable(playerid, 1);
}
else
{
Gas[VID] += FillUp;
format(string,sizeof(string),"{739EFA}* Voziloto e napolneto za $%d.",plakjanje);
SendClientMessage(playerid,COLOR_WHITE,string);
GivePlayerMoney(playerid, -plakjanje);
TogglePlayerControllable(playerid, 1);
}
}
else
{
format(string,sizeof(string),"{FF4040}GRESKA: {FFFFFF}Nemate dovolno pari za gorivo, smetkata e $%d.",plakjanje);
SendClientMessage(playerid,COLOR_WHITE,string);
TogglePlayerControllable(playerid, 1);
}
}
pawn Код:
warning 204: symbol is assigned a value that is never used: "sendername"
warning 204: symbol is assigned a value that is never used: "string"
warning 219: local variable "string" shadows a variable at a preceding level
error 012: invalid function call, not a valid address
warning 215: expression has no effect
error 001: expected token: ";", but found ")" - Line 3646
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
pawn Код:
if(IsACopCar(VID) || IsAnAmbulance(VID) || NRCar(VID))