19.03.2018, 00:50
Hi. How can I change the checkpoint into IsPlayerInRangeOfPoint ? And make something which will tell player where to go
OR, what can I do to airdrop without chaning it's forwarding or making it command?
Its a job system which you have to go into checkpoints, but instead of checkpoints I want to put IsPlayerInRangeOfPoint because every 15 minutes server forwards airdrop which creates new checkpoint.
OR, what can I do to airdrop without chaning it's forwarding or making it command?
PHP код:
if(GunoierJob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2741.6865,-1504.8694,30.9064, 5.0);
AddSlotToInventoryWorld(playerid,"Sticla de Apa Plina",1);
SendClientMessage(playerid, -1, "{FFCC33}Ai primit {FF0000}Sticla de Apa Plina {FFCC33}pentru primul transport al gunoiului!");
GunoierJob[playerid] = 2;
return 1;
}
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(GunoierJob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2741.6865,-1504.8694,30.9064, 5.0);
AddSlotToInventoryWorld(playerid,"Sticla de Apa Plina",1);
SendClientMessage(playerid, -1, "{FFCC33}Ai primit {FF0000}Sticla de Apa Plina {FFCC33}pentru primul transport al gunoiului!");
GunoierJob[playerid] = 2;
return 1;
}
if(GunoierJob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2703.7903,-1065.6555,69.8232, 5.0);
GivePlayerMoney(playerid, 4321);
SendClientMessage(playerid, -1, "{FFCC33}Ai primit {FF0000}4321 $ {FFCC33}pentru al doilea transport al gunoiului!");
GunoierJob[playerid] = 3;
return 1;
}
if(GunoierJob[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2257.4766,-1150.7429,27.3426, 5.0);
GivePlayerMoney(playerid, 6311);
SendClientMessage(playerid, -1, "{FFCC33}Ai primit {FF0000}6311 $ {FFCC33}pentru al treilea transport al gunoiului!");
GunoierJob[playerid] = 4;
return 1;
}
if(GunoierJob[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2390.6865,-1726.5602,14.0437, 5.0);
GivePlayerMoney(playerid, 3954);
SendClientMessage(playerid, -1, "{FFCC33}Ai primit {FF0000}3954 $ {FFCC33}pentru al patrulea transport al gunoiului!");
GunoierJob[playerid] = 5;
return 1;
}
if(GunoierJob[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2229.7378,-1977.7834,13.9928, 5.0);
GivePlayerMoney(playerid, 9213);
SendClientMessage(playerid, -1, "{FFCC33}Ai primit {FF0000}9213 $ {FFCC33}pentru ultimul transport al gunoiului!");
GunoierJob[playerid] = 6;
return 1;
}
if(GunoierJob[playerid] == 6)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2229.7378,-1977.7834,13.9928, 5.0);
GivePlayerMoney(playerid, 9213);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ti-ai terminat tura! Mai poti face ture suplimentare dacг mai doresti!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sau poti iesi, scriind: {FF0000}/Iesi!");
GunoierJob[playerid] = 0;
DisablePlayerCheckpoint(playerid);
return 1;
}
//==========================================================================
if(PizzaJob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1442.1306,-1585.9479,13.1088 ,5.0);
PizzaJob[playerid] = 2;
GivePlayerMoney(playerid, 5430);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit pentru prima livrare suma de bani: {FF0000}5430 $!");
return 1;
}
if(PizzaJob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1203.1559,-1438.2799,13.0255 ,5.0);
PizzaJob[playerid] = 3;
GivePlayerMoney(playerid, 6794);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit pentru a doua livrare suma de bani: {FF0000}6794 $!");
return 1;
}
if(PizzaJob[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1530.6595,-1433.8102,13.1111 ,5.0);
PizzaJob[playerid] = 4;
GivePlayerMoney(playerid, 3965);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit pentru a treia livrare suma de bani: {FF0000}3965 $!");
return 1;
}
if(PizzaJob[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1997.0874,-1453.9196,13.1161 ,5.0);
PizzaJob[playerid] = 5;
GivePlayerMoney(playerid, 7823);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit pentru a patra livrare suma de bani: {FF0000}7823 $!");
return 1;
}
if(PizzaJob[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2095.1331,-1776.1432,13.1031 ,5.0);
PizzaJob[playerid] = 6;
GivePlayerMoney(playerid, 5672);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit pentru a cincea livrare suma de bani: {FF0000}5672 $!");
return 1;
}
if(PizzaJob[playerid] == 6)
{
DisablePlayerCheckpoint(playerid);
PizzaJob[playerid] = 0;
GivePlayerMoney(playerid, 9182);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit pentru a ultima livrare suma de bani: {FF0000}9182 $!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ti s-a terminat tura. Poti face ture suplimentare dacг doresti!");
return 1;
}
//==========================================================================
if(TaietorJob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
TaietorJob[playerid] = 2;
SetPlayerCheckpoint(playerid, 773.2032,-1242.4979,13.1317, 5.0);
GivePlayerMoney(playerid, 1002);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani: {FF0000}1002 $!");
return 1;
}
if(TaietorJob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
TaietorJob[playerid] = 3;
SetPlayerCheckpoint(playerid, 749.0557,-1257.6147,13.1412,5.0);
GivePlayerMoney(playerid, 1441);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani: {FF0000}1441 $!");
return 1;
}
if(TaietorJob[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
TaietorJob[playerid] = 4;
SetPlayerCheckpoint(playerid, 740.0237,-1287.6920,13.1459, 5.0);
GivePlayerMoney(playerid, 1551);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani: {FF0000}1571 $!");
return 1;
}
if(TaietorJob[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
TaietorJob[playerid] = 5;
SetPlayerCheckpoint(playerid, 774.9744,-1277.7102,13.1458, 5.0);
GivePlayerMoney(playerid, 1551);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani: {FF0000}1231 $!");
return 1;
}
if(TaietorJob[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
TaietorJob[playerid] = 6;
SetPlayerCheckpoint(playerid, 752.9723,-1260.6201,13.1395, 5.0);
GivePlayerMoney(playerid, 1551);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani: {FF0000}1241 $!");
return 1;
}
if(TaietorJob[playerid] == 6)
{
DisablePlayerCheckpoint(playerid);
TaietorJob[playerid] = 0;
GivePlayerMoney(playerid, 2121);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani: {FF0000}2121 $!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ti-ai terminat tura!");
return 1;
}
//===============================TIRIST=====================================
if(CamionagiuJob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
CamionagiuJob[playerid] = 2;
GivePlayerMoney(playerid, 13213);
SetPlayerCheckpoint(playerid, 68.5184,-223.8562,1.1385, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}13213 $!");
return 1;
}
if(CamionagiuJob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
CamionagiuJob[playerid] = 3;
GivePlayerMoney(playerid, 15932);
SetPlayerCheckpoint(playerid, 361.5314,-147.2714,1.5214, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}15932 $!");
return 1;
}
if(CamionagiuJob[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
CamionagiuJob[playerid] = 4;
GivePlayerMoney(playerid, 16441);
SetPlayerCheckpoint(playerid, 446.1693,-468.6712,36.3943, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}16441 $!");
return 1;
}
if(CamionagiuJob[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
CamionagiuJob[playerid] = 5;
GivePlayerMoney(playerid, 13212);
SetPlayerCheckpoint(playerid, 162.9215,-1404.0992,46.1156, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}13212 $!");
return 1;
}
if(CamionagiuJob[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
CamionagiuJob[playerid] = 6;
GivePlayerMoney(playerid, 17432);
SetPlayerCheckpoint(playerid, -88.3408,-1123.5488,0.6608, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}17432 $!");
return 1;
}
if(CamionagiuJob[playerid] == 6)
{
DisablePlayerCheckpoint(playerid);
CamionagiuJob[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ti-ai terminat tura cu succes. Poti face ture suplimentare dacг doresti!");
return 1;
}
//============================VГNZГTOR======================================
if(VanzatorJob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
VanzatorJob[playerid] = 2;
GivePlayerMoney(playerid, 9912);
SetPlayerCheckpoint(playerid, 1966.4468,-2014.7025,12.9459, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}9912 $!");
return 1;
}
if(VanzatorJob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
VanzatorJob[playerid] = 3;
GivePlayerMoney(playerid, 8841);
SetPlayerCheckpoint(playerid, 1996.1888,-1757.2458,12.9417, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}8841 $!");
return 1;
}
if(VanzatorJob[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
VanzatorJob[playerid] = 4;
GivePlayerMoney(playerid, 8921);
SetPlayerCheckpoint(playerid, 2210.5994,-1750.5896,13.0132, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}8921 $!");
return 1;
}
if(VanzatorJob[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
VanzatorJob[playerid] = 5;
GivePlayerMoney(playerid, 12312);
SetPlayerCheckpoint(playerid, 2113.4717,-2102.0234,13.1208, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}12312 $!");
return 1;
}
if(VanzatorJob[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
VanzatorJob[playerid] = 0;
GivePlayerMoney(playerid, 12321);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ti-ai terminat tura. Poti face ore suplimentare, dacг doresti!");
return 1;
}
//==========================LIVRATOR========================================
if(LivratorJob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
LivratorJob[playerid] = 2;
GivePlayerMoney(playerid, 9382);
SetPlayerCheckpoint(playerid, 1229.6967,-1411.1860,13.2548, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}9382 $!");
return 1;
}
if(LivratorJob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
LivratorJob[playerid] = 3;
GivePlayerMoney(playerid, 7892);
SetPlayerCheckpoint(playerid, 1433.1575,-1722.6649,13.4536, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}7823 $!");
return 1;
}
if(LivratorJob[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
LivratorJob[playerid] = 4;
GivePlayerMoney(playerid, 8954);
SetPlayerCheckpoint(playerid, 825.2704,-1789.3202,13.8954, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}8954 $!");
return 1;
}
if(LivratorJob[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
LivratorJob[playerid] = 5;
GivePlayerMoney(playerid, 8954);
SetPlayerCheckpoint(playerid, 386.4106,-1513.9083,32.6000, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit suma de bani, pentru aceasta livrare: {FF0000}8954 $!");
return 1;
}
if(LivratorJob[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
LivratorJob[playerid] = 0;
GivePlayerMoney(playerid, 3822);
SetPlayerCheckpoint(playerid, 386.4106,-1513.9083,32.6000, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ti-ai terminat tura. Poti face ore suplimentare dacг doresti!");
return 1;
}
//==========================FERMIER=========================================
if(FermierJob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
FermierJob[playerid] = 2;
GivePlayerMoney(playerid, 3822);
SetPlayerCheckpoint(playerid, -530.1547,-1401.9867,12.8266, 5.0);
return 1;
}
if(FermierJob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
FermierJob[playerid] = 3;
GivePlayerMoney(playerid, 3822);
SetPlayerCheckpoint(playerid, -584.9694,-1368.7939,17.1993, 5.0);
return 1;
}
if(FermierJob[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
FermierJob[playerid] = 4;
GivePlayerMoney(playerid, 3822);
SetPlayerCheckpoint(playerid, -528.5095,-1306.6334,19.9329, 5.0);
return 1;
}
if(FermierJob[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
FermierJob[playerid] = 5;
GivePlayerMoney(playerid, 3822);
SetPlayerCheckpoint(playerid, -459.2954,-1294.7139,32.7592, 5.0);
return 1;
}
if(FermierJob[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
FermierJob[playerid] = 6;
GivePlayerMoney(playerid, 3822);
SetPlayerCheckpoint(playerid, -396.3111,-1312.5621,27.6615, 5.0);
return 1;
}
if(FermierJob[playerid] == 6)
{
DisablePlayerCheckpoint(playerid);
FermierJob[playerid] = 7;
GivePlayerMoney(playerid, 3822);
SetPlayerCheckpoint(playerid, -362.1909,-1398.0966,20.5549, 5.0);
return 1;
}
if(FermierJob[playerid] == 7)
{
DisablePlayerCheckpoint(playerid);
FermierJob[playerid] = 0;
GivePlayerMoney(playerid, 3822);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ti-ai terminat tura. Poti face ore suplimentare!");
return 1;
}
//===============================HOTDOG=====================================
if(HotdogJob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
HotdogJob[playerid] = 2;
GivePlayerMoney(playerid, 12122);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit pentru livrare: {FF0000}12122 $$!");
SetPlayerCheckpoint(playerid, 2106.6611,-1428.0917,23.8287, 5.0);
return 1;
}
if(HotdogJob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
HotdogJob[playerid] = 3;
GivePlayerMoney(playerid, 6874);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit pentru livrare: {FF0000}6874 $$!");
SetPlayerCheckpoint(playerid, 2008.3776,-1677.8745,13.3285, 5.0);
return 1;
}
if(HotdogJob[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
HotdogJob[playerid] = 0;
GivePlayerMoney(playerid, 18934);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit pentru ultima livrare: {FF0000}18934 $$!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ti-ai incheiat tura {FF0000}!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, -1,"{ff0000}Nu poti primi pachetul stand in masina!");
new string[128], nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, nome, sizeof(nome));
format(string, sizeof string,"{ff0000}[PACHET AERIAN]{ffffff}: %s a luat pachetul",nome);
SendClientMessageToAll(-1,string);
Delete3DTextLabel(airlabel);
DisablePlayerCheckpoint(playerid);
DestroyObject(air);
ShowPlayerDialog(
return 1;
}
forward Airdrop();
public Airdrop()
{
Delete3DTextLabel(airlabel);
DestroyObject(air);
//Criar TextLabel
airlabel = Create3DTextLabel("{fff700}AIRDROP:{ffffff}Acest pachet militar \ncontine mai multe arme",0xFFFFFF,306.42618, 2026.72473, 16.73662, 30, 0);
//Criar e Mover Airdrop
air = CreateObject(18849, -223.3057, 991.9159, 45.1256, 0.00000, 0.00000, 0.00000);
MoveObject(air, -221.5663,992.9471,20.8397, 3.0);
//Setar Checkpoint Para o Jogador
for(new i=0; i < MAX_PLAYERS; i++)
{
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i, -222.0864,992.7004,19.5774,3);
}
//Enviar Mensagem Que o Airdrop Foi Solto
SendClientMessageToAll(-1, "{ff0000}[AIRDROP]: {ffffff}PText");
printf(" ");
new hora, minuto, segundo; gettime(hora,minuto,segundo);
printf("> [PACHET AERIAN]: Pachetul Aerian a fost lansat la Fort Carson Sherrif Department: Ora: [%i/%i/%i]", hora, minuto, segundo);
return 1;
}