daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. forward KraunamPaletes(playerid);
  2. public KraunamPaletes(playerid)
  3. {
  4.     if(!IsPlayerInAnyVehicle(playerid)) {
  5.     SendClientMessage(playerid,COLOR_RED,"Jūs išlipote iš fūros todėl pakrovimas atšauktas.");
  6.     playerDB[playerid][krauna]=0;
  7.     TogglePlayerControllable(playerid, true); return 1;}
  8.     if(playerDB[playerid][masina] == -1) return SendClientMessage(playerid,RED,"* Jūs be fūros.");
  9.     new vehicleid = playerDB[playerid][masina];
  10.      if(vehicleDB[GetVehicleTrailer(vehicleid)][ikrauta] > 99)
  11.      {
  12.          TogglePlayerControllable(playerid, true);
  13.          GameTextForPlayer(playerid,"Pakrauta 100/100 priekaba.",4000,5);
  14.          SendClientMessage(playerid, COLOR_YELLOW, "• {ffffff}Jūsų priekaba pilnai pakrauta.");
  15.          RemovePlayerMapIcon( playerid, 12 );
  16.          playerDB[playerid][krauna]=0;
  17.          playerDB[playerid][paleciup]=-1;
  18.          DeletePlayer3DTextLabel(playerid, labelid);
  19.      return 1;
  20.      }
  21.     if(GetPlayerMoneyA(playerid) < 20)
  22.     {
  23.         SendClientMessage(playerid,RED,"• Jūs neturite pinigų pakrovimui todėl pakrovimas sustabdomas.");
  24.         TogglePlayerControllable(playerid, true);
  25.         SendClientMessage(playerid, COLOR_YELLOW, "• {ffffff}Atšaukėte palečių krovimą.");
  26.         RemovePlayerMapIcon( playerid, 12 );
  27.         playerDB[playerid][krauna]=0;
  28.         KillTimer(KraunamPaletes1[playerid]);
  29.         playerDB[playerid][paleciup]=-1;
  30.         DeletePlayer3DTextLabel(playerid, labelid);
  31.     return 1;
  32.     }
  33.     TogglePlayerControllable(playerid, false);
  34.     vehicleDB[GetVehicleTrailer(vehicleid)][ikrauta] += 2;
  35.     GivePlayerMoneyA(playerid, -20);
  36.     new stringas[18];
  37.     format(stringas, sizeof(stringas), "Pakrauta %i/100 KG", vehicleDB[GetVehicleTrailer(vehicleid)][ikrauta]);
  38.     GameTextForPlayer(playerid, stringas, 1000, 5);
  39.     KraunamPaletes1[playerid] = SetTimerEx("KraunamPaletes", 1000, false, "d", playerid);
  40. return 1;
  41. }
  42. forward IskraunamPaletes(playerid);
  43. public IskraunamPaletes(playerid)
  44. {
  45.     if(!IsPlayerInAnyVehicle(playerid)){
  46.     playerDB[playerid][iskrauna]=0;
  47.     SendClientMessage(playerid,COLOR_RED,"Jūs išlipote iš fūros todėl iškrovimas atšauktas.");
  48.     return 1;}
  49.     if(vehicleDB[GetVehicleTrailer(GetPlayerVehicleID(playerid))][ikrauta] < 1)
  50.     {
  51.             SendClientMessage(playerid, COLOR_YELLOW, "• {ffffff}Paletės iškrautos iš priekabos.");
  52.             TogglePlayerControllable(playerid, true);
  53.             playerDB[playerid][paleciui]=-1;
  54.             playerDB[playerid][iskrauna]=0;
  55.             playerDB[playerid][furxp]+=3;
  56.             playerDB[playerid][krovinysp]+=1;
  57.             DeletePlayer3DTextLabel(playerid, labelid);
  58.     return 1;
  59.     }
  60.     TogglePlayerControllable(playerid, false);
  61.     vehicleDB[GetVehicleTrailer(GetPlayerVehicleID(playerid))][ikrauta] -= 2;
  62.     new stringas[35];
  63.     if(playerDB[playerid][furxp] > 500){if(playerDB[playerid][furxp] < 1000){GivePlayerMoneyA(playerid, 40);}}
  64.     if(playerDB[playerid][furxp] > 1000){if(playerDB[playerid][furxp] < 2000){GivePlayerMoneyA(playerid, 50);}}
  65.     if(playerDB[playerid][furxp] > 2000){if(playerDB[playerid][furxp] < 5000){GivePlayerMoneyA(playerid, 60);}}
  66.     if(playerDB[playerid][furxp] < 500){GivePlayerMoneyA(playerid, 30);}
  67.     format(stringas, sizeof(stringas), "Priekaboje liko paleciu %i/100 KG", vehicleDB[GetVehicleTrailer(GetPlayerVehicleID(playerid))][ikrauta]);
  68.     GameTextForPlayer(playerid, stringas, 1000, 5);
  69.     IskraunamPaletes1[playerid] = SetTimerEx("IskraunamPaletes", 1000, false, "d", playerid);
  70. return 1;
  71. }
  72. forward KraunamDegalus(playerid);
  73. public KraunamDegalus(playerid)
  74. {
  75.     if(!IsPlayerInAnyVehicle(playerid)) {
  76.      SendClientMessage(playerid,COLOR_RED,"Jūs išlipote iš fūros todėl pakrovimas atšauktas.");
  77.      playerDB[playerid][krauna]=0;
  78.      TogglePlayerControllable(playerid, true); return 1;}
  79.     if(playerDB[playerid][masina] == -1) return SendClientMessage(playerid,RED,"* Jūs neturite atsivaręs fūros.");
  80.     new vehicleid = playerDB[playerid][masina];
  81.     if(vehicleDB[GetVehicleTrailer(vehicleid)][ikrauta] > 99)
  82.     {
  83.           TogglePlayerControllable(playerid, true);
  84.           GameTextForPlayer(playerid,"Pakrauta 100/100 L degalu cisterna.",4000,5);
  85.           SendClientMessage(playerid, COLOR_YELLOW, "• {ffffff}Jūsų degalų cisterna pilnai pakrauta.");
  86.           RemovePlayerMapIcon( playerid, 12 );
  87.           playerDB[playerid][krauna]=0;
  88.           playerDB[playerid][degalup]=-1;
  89.           DeletePlayer3DTextLabel(playerid, labelid);
  90.     return 1;
  91.     }
  92.  
  93.     if(GetPlayerMoneyA(playerid) < 20)
  94.     {
  95.           SendClientMessage(playerid,RED,"• Jūs neturite pinigų pakrovimui todėl pakrovimas sustabdomas.");
  96.           playerDB[playerid][paleciup]=-1;
  97.           TogglePlayerControllable(playerid, true);
  98.           SendClientMessage(playerid, COLOR_YELLOW, "• {ffffff}Jūs atšaukėte degalų krovimą.");
  99.           RemovePlayerMapIcon( playerid, 12 );
  100.           playerDB[playerid][krauna]=0;
  101.           KillTimer(KraunamDegalus1[playerid]);
  102.           playerDB[playerid][degalup]=-1;
  103.           DeletePlayer3DTextLabel(playerid, labelid);
  104.     return 1;
  105.     }
  106.     TogglePlayerControllable(playerid, false);
  107.     GivePlayerMoneyA(playerid, -20);
  108.     vehicleDB[GetVehicleTrailer(vehicleid)][ikrauta] += 2;
  109.     new stringas[18];
  110.     format(stringas, sizeof(stringas), "Pakrauta %i/100 L", vehicleDB[GetVehicleTrailer(vehicleid)][ikrauta]);
  111.     GameTextForPlayer(playerid, stringas, 1000, 5);
  112.     KraunamDegalus1[playerid] = SetTimerEx("KraunamDegalus", 1000, false, "d", playerid);
  113. return 1;
  114. }
  115.  
  116. forward IskraunamDegalus(playerid);
  117. public IskraunamDegalus(playerid)
  118. {
  119.     if(!IsPlayerInAnyVehicle(playerid)){
  120.     playerDB[playerid][iskrauna]=0;
  121.     SendClientMessage(playerid,COLOR_RED,"Jūs išlipote iš fūros todėl iškrovimas atšauktas.");
  122.     return 1;}
  123.     if(vehicleDB[GetVehicleTrailer(GetPlayerVehicleID(playerid))][ikrauta] < 1)
  124.     {
  125.             SendClientMessage(playerid, COLOR_YELLOW, "• {ffffff}Degalai išpilti iš cisternos.");
  126.             TogglePlayerControllable(playerid, true);
  127.             playerDB[playerid][degalui]=-1;
  128.             playerDB[playerid][iskrauna]=0;
  129.             playerDB[playerid][furxp]+=3;
  130.             playerDB[playerid][krovinysd]+=1;
  131.             DeletePlayer3DTextLabel(playerid, labelid);
  132.     return 1;
  133.     }
  134.     TogglePlayerControllable(playerid, false);
  135.     vehicleDB[GetVehicleTrailer(GetPlayerVehicleID(playerid))][ikrauta] -= 2;
  136.     new stringas[35];
  137.     if(playerDB[playerid][furxp] > 500){if(playerDB[playerid][furxp] < 1000){GivePlayerMoneyA(playerid, 40);}}
  138.     if(playerDB[playerid][furxp] > 1000){if(playerDB[playerid][furxp] < 2000){GivePlayerMoneyA(playerid, 50);}}
  139.     if(playerDB[playerid][furxp] > 2000){if(playerDB[playerid][furxp] < 5000){GivePlayerMoneyA(playerid, 60);}}
  140.     if(playerDB[playerid][furxp] < 500){GivePlayerMoneyA(playerid, 30);}
  141.     format(stringas, sizeof(stringas), "Cisternoje liko degalu %i/100 L", vehicleDB[GetVehicleTrailer(GetPlayerVehicleID(playerid))][ikrauta]);
  142.     GameTextForPlayer(playerid, stringas, 1000, 5);
  143.     IskraunamDegalus1[playerid] = SetTimerEx("IskraunamDegalus", 1000, false, "d", playerid);
  144. return 1;
  145. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top