Theodore123

asd

May 25th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. if(dialogid == DIALOG_APPONUDA)
  2. {
  3. new i;
  4. new sendername[MAX_PLAYER_NAME];
  5. GetPlayerName(playerid, sendername, sizeof(sendername));
  6. i = ConvertVehIDtoDYID(IDavtomobil[playerid]);
  7. if(!response)
  8. {
  9. SCMF(ProdavacAvtomobil[playerid],BELA,"{739EFA}%s ja odbi ponudata da go kupi vasiot Avtomobil",GetName(playerid));
  10. SCMF(playerid,BELA,"{739EFA}Ja odbivte ponudata da go kupite avtomobilot na %s",GetName(ProdavacAvtomobil[playerid]));
  11. CenaAvtomobil[playerid] = 0;
  12. IDavtomobil[playerid] = 0;
  13. IgracKProdajesA[ProdavacAvtomobil[playerid]] = 0;
  14. ProdavacAvtomobil[playerid] = 0;
  15. }
  16. else
  17. {
  18. if(!ProxDetectorS(5.0,playerid,ProdavacAvtomobil[playerid])) return SCM(playerid,BELA,"{FF4040}GRESKA:{FFFFFF}Gazdata na avtomobilot ne e blisku do vas!");
  19. if(GetPlayerMoney(playerid) < CenaAvtomobil[playerid]) return SCM(playerid,BELA,"{FF4040}GRESKA:{FFFFFF}Nemate dovolno pari za da go kupite ovoj Avtomobil");
  20. if(PlayerInfo[playerid][pLevel] < 5) return SCM(playerid,BELA,"{FF4040}GRESKA:{FFFFFF}Nemate dovolno Level za da kupite Avtomobil (5+)");
  21. GivePlayerMoney(playerid,-CenaAvtomobil[playerid]);
  22. GivePlayerMoney(ProdavacAvtomobil[playerid],CenaAvtomobil[playerid]);
  23. SCMF(playerid, COLOR_WHITE, "{739EFA}Ja prifativte ponudata i go kupivte avtomobilot na %s", GetName(ProdavacAvtomobil[playerid]));
  24. SCMF(ProdavacAvtomobil[playerid], COLOR_WHITE, "{739EFA}%s ja prifati ponudata i go kupi vasiot avtomobil", GetName(playerid));
  25. strmid(MyVehicle[IDavtomobil[playerid]][MyVehOwner], ImeIgraca(playerid), 0, strlen(ImeIgraca(playerid)), 255);
  26. MyVehicle[playerid][MyVehCar] = 1;
  27. OnPlayerUpdate(playerid);
  28. MyVehicle[ProdavacAvtomobil[playerid]][MyVehCar] = -1;
  29. OnPlayerUpdate(ProdavacAvtomobil[playerid]);
  30. UpdateMyVehSystem(i);
  31. RemovePlayerFromVehicle(IgracKProdajesA[playerid]);
  32. MyVehicle[i][MyVehLock] = 0;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment