Majsa Áron
{ Polihisztor } kérdése
672
7 éve
Hello? Ez igy jó-e?
#include <a_samp>
#include <zcmd>
#define SIKER -1
#define SIMASZIN -1
new munkafizetés = 50 + (random)160
enum pInfo
{
pBankAccount
PlayerInfo
}
new Mentesek[64];
CMD:farmermunka(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Válaszd ki a munkád!", "Farmer", "Kiválaszt", "Kilép");
SetPlayerSkin(playerid, 158);
return 1 ;
}
/* if(sscanf(params, "s[32]", params))
{
SendClientMessage(playerid, COLOR_GREY, "Következő!.");
return 1;
}
if(!strcmp(params, "farmer", true))
{
PlayerInfo[playerid][pJob] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Mostmár farmerként dolgozol.");
}*/
CMD:felmond(playerid, params[])
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Kiléptél a munkádból");
PlayerInfo[playerid][pJob] = 0;
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 10, -309.0990,-1381.1797,10.7049))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 23 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -286.6838,-1366.6523,9.2448, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -286.6838,-1366.6523,9.2448))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 22 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -299.1016,-1345.1233,7.8737, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -299.1016,-1345.1233,7.8737))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 21 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -285.5391,-1314.0519,9.4996, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -285.5391,-1314.0519,9.4996))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 20 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -263.7585,-1322.7645,9.2727, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -263.7585,-1322.7645,9.2727))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 19 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -247.7353,-1312.8854,10.7708, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -247.7353,-1312.8854,10.7708))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 18 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -230.6390,-1326.7452,10.5278, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -230.6390,-1326.7452,10.5278))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 17 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -208.9200,-1312.6355,8.0123, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -208.9200,-1312.6355,8.0123))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 16 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -184.9501,-1314.5737,6.7411, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -184.9501,-1314.5737,6.7411))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 15 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -165.0671,-1340.6115,3.1610, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -165.0671,-1340.6115,3.1610))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 14 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -182.6981,-1357.5033,4.1997, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -182.6981,-1357.5033,4.1997))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 13 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -166.5868,-1381.2855,3.2646, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -166.5868,-1381.2855,3.2646))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 12 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -169.7452,-1395.7577,3.3153, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -169.7452,-1395.7577,3.3153))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 11 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -162.0952,-1412.2350,3.0394, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -162.0952,-1412.2350,3.0394))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 10 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -192.4460,-1407.2355,3.9017, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -192.4460,-1407.2355,3.9017))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 9 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -207.5008,-1421.8888,3.2155, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -207.5008,-1421.8888,3.2155))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 8 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -226.2545,-1411.9092,6.5599, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -226.2545,-1411.9092,6.5599))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 7 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -247.6317,-1427.6404,6.6805, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -247.6317,-1427.6404,6.6805))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 6 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -263.1941,-1420.1913,9.3854, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -263.1941,-1420.1913,9.3854))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 5 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -284.1987,-1431.4486,12.0138, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -284.1987,-1431.4486,12.0138))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 4 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -300.6557,-1424.9337,14.0705, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -300.6557,-1424.9337,14.0705))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 3 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -320.6297,-1431.7501,15.1514, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -320.6297,-1431.7501,15.1514))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 2 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -330.9842,-1410.7192,14.1269, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -330.9842,-1410.7192,14.1269))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép munka! Még 1 CP van a munka befejezéséig.");
SetPlayerCheckpoint(playerid, -343.0883,-1369.3920,14.4816, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -343.0883,-1369.3920,14.4816))
{
new string[256];
new vehicleid = GetPlayerVehicleID(playerid);
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Gratulálok újonc! Befejezted az aratást. Ittvan egy kis pénzt.");
SendClientMessage(playerid, COLOR_PURPLE,"[FARMER MUNKA]Kaptál egy kis pénzt az aratásért!");
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SetVehicleToRespawn(vehicleid);
Harvesting[playerid] =0;
GivePlayerMoney(playerid, 170);
format(string, sizeof(string), "~w~Fizetés! Összege: 170$");
GameTextForPlayer(playerid, string, 3000, 1);
}
//===FSHARE===//
if(IsPlayerInRangeOfPoint(playerid, 10, -335.1576,-1030.4205,59.1934))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Gratulálok! Még 4 CP van hátra.");
SetPlayerCheckpoint(playerid, -1111.2207,-1619.7231,76.3672, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -1111.2207,-1619.7231,76.367))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Gratulálok! Még 3 CP van hátra.");
SetPlayerCheckpoint(playerid, -414.3708,-1754.7161,6.4640, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -414.3708,-1754.7161,6.4640))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Gratulálok! Még 2 CP van hátra.");
SetPlayerCheckpoint(playerid, -579.6287,-1468.8931,10.5009, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -579.6287,-1468.8931,10.5009))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Gratulálok! Még 1 CP van hátra.");
SetPlayerCheckpoint(playerid, -382.5363,-1426.1783,26.2084, 10);
}
if(IsPlayerInRangeOfPoint(playerid, 10, -382.5363,-1426.1783,26.2084))
{
new string[256];
new vehicleid = GetPlayerVehicleID(playerid);
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA]Szép volt! Itt a jutalmad. Használd egézséggel.");
SendClientMessage(playerid, COLOR_PURPLE,"[FARMER MUNKA]Kaptál egy kenyérre való pénzt.");
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SetVehicleToRespawn(vehicleid);
GivePlayerMoney(playerid, 240);
format(string, sizeof(string), "~w~Fizetés! Összege: 240$");
GameTextForPlayer(playerid, string, 3000, 1);
}
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(Harvesting[playerid])
{
DisablePlayerCheckpoint(playerid);
Harvesting[playerid] = 0;
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid, "~r~MUNKA SIKERTELEN", 1000, 0);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA] Elhagytad a munkajármüved ezért sikertelen a munka.");
}
if(Sharing[playerid])
{
DisablePlayerCheckpoint(playerid);
Sharing[playerid] = 0;
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid, "~r~MUNKA SIKERTELEN", 1000, 0);
SendClientMessage(playerid, COLOR_GREY, "[FARMER MUNKA] Elhagytad a munkajármüved ezért sikertelen a munka.");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
switch(listitem)
{
case 0:
{ // Farmer
PlayerInfo[playerid][pJob] = 1;
SendClientMessage(playerid, COLOR_GREEN, "[FARMER MUNKA] Mostantól farmerként dolgozol!");
}
}
}
}
CMD:aratas(playerid, params[])
{
if(PlayerInfo[playerid][pJob] == 1)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsAFarverCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE)
{
SendClientMessage(playerid, COLOR_GREEN, "[FARMER MUNKA]Kövesd a CP-ket.");
SetPlayerCheckpoint(playerid, -309.0990,-1381.1797,10.7049, 10);
Harvesting[playerid] =1;
}
}
else return SendClientMessage(playerid, COLOR_LIGHTRED, "[FARMER MUNKA]Nem vagy a farmnál!");
}
else return SendClientMessage(playerid, COLOR_LIGHTRED, "[FARMER MUNKA]Nem vagy farmer!");
return 1;
}
CMD:tejszallitas(playerid, params[])
{
if(PlayerInfo[playerid][pJob] == 1)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsAFarverCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE)
{
SendClientMessage(playerid, COLOR_GREEN, "[FARMER MUNKA]Kövesd a CP-ket.");
SetPlayerCheckpoint(playerid,-335.1576,-1030.4205,59.1934, 10);
Sharing[playerid] =1;
}
}
else return SendClientMessage(playerid, COLOR_LIGHTRED, "[FARMER MUNKA]Nem vagy a farmnál!");
}
else return SendClientMessage(playerid, COLOR_LIGHTRED, "[FARMER MUNKA]Nem vagy farmer!");
return 1;
}
Jelenleg 1 felhasználó nézi ezt a kérdést.
0
Felsőoktatás / Informatika