Vadim12
Ученик
PHP:
new Float:RandomSpawn[][4] =
{
{1919.7749, -1760.5482, 13.5469, 10.0},
{1361.9775, -1290.5338, 13.3604, 10.0},
{1137.8004, -1755.2164, 13.5811, 10.0}
};
new keis[MAX_PLAYERS];
new incos[2];
/////
public OnPlayerStateChange
сюда добавил
}
else if(newcar >= incos[0] && newcar <= incos[1])
{
if(PI[playerid][pJob] != 7) {
ErrorMessage(playerid, "Вы не инкассатор! /gps - Мэрия");
}
else
{
SetPlayerCheckpoint(playerid,1657.8308,-1343.4668,17.4358,5);
SendClientMessage(playerid,COLOR_RED, "Загрузитесь деньгами у банка LS");
PicCP[playerid] = 0;
}
///////////////////
public OnPlayerEnterCheckpoint(playerid)
}
if(IsPlayerInRangeOfPoint(playerid,1.5,1363.5437,-1646.3835,13.3828))
{
if(useguns[playerid] == 0 && PicCP[playerid] == 2) return ShowPlayerDialog(playerid, D_JOB, DSM, "Устройство на работу","Посмотреть список доступных работ?", "Да", "Нет");
}
if(IsPlayerInRangeOfPoint(playerid, 10.0,1425.6633,-1709.4857,13.5085))
{
SendClientMessage(playerid,COLOR_GREEN, "Отвезите деньги к банкомату (банкомат отмечен красной точкой на карте)");
DisablePlayerCheckpoint(playerid);
keis[playerid] = 1;
new rand = random(sizeof(RandomSpawn));
SetPlayerCheckpoint(playerid,RandomSpawn[rand][0],RandomSpawn[rand][1],RandomSpawn[rand][2],RandomSpawn[rand][3]);
return true;
}
if(IsPlayerInRangeOfPoint(playerid, 10.0,1919.7749,-1760.5482,13.5469))
{
SendClientMessage(playerid,COLOR_GREEN, "Выйдите из машины и отнесите деньги в банкомат (/bankup)");
DisablePlayerCheckpoint(playerid);
SetPlayerAttachedObject(playerid,3,1210,5,0.299999,0.099999,0.000000,0.000000,-83.000000,0.000000,1.000000,1.000000,1.000000);
keis[playerid] = 1;
return true;
}
if(IsPlayerInRangeOfPoint(playerid, 10.0,1361.9775,-1290.5338,13.3604))
{
SendClientMessage(playerid,COLOR_GREEN, "Выйдите из машины и отнесите деньги в банкомат (/bankup)");
DisablePlayerCheckpoint(playerid);
SetPlayerAttachedObject(playerid,3,1210,5,0.299999,0.099999,0.000000,0.000000,-83.000000,0.000000,1.000000,1.000000,1.000000);
keis[playerid] = 1;
return true;
}
if(IsPlayerInRangeOfPoint(playerid, 10.0,1137.8004,-1755.2164,13.5811))
{
SendClientMessage(playerid,COLOR_GREEN, "Выйдите из машины и отнесите деньги в банкомат (/bankup)");
DisablePlayerCheckpoint(playerid);
SetPlayerAttachedObject(playerid,3,1210,5,0.299999,0.099999,0.000000,0.000000,-83.000000,0.000000,1.000000,1.000000,1.000000);
keis[playerid] = 1;
return true;
////////////
CMD:bankup(playerid, params[])
{
if(keis[playerid] != 1) return SendClientMessage(playerid,COLOR_GRAD1,"У вас нет собой кейса");
if(!IsPlayerInRangeOfPoint(playerid,10.0,1919.7749, -1760.5482, 13.5469) && !IsPlayerInRangeOfPoint(playerid,10.0,1361.9775, -1290.5338, 13.3604) && !IsPlayerInRangeOfPoint(playerid,10.0,1137.8004, -1755.2164, 13.5811)) return true;
if(PI[playerid][pCash] < 2900)
SendClientMessage(playerid,COLOR_GREEN,"Вы успешно вложили деньги в банкомат. Для продолжение вернитесь в машину!");
RemovePlayerAttachedObject(playerid,3);
keis[playerid] = 0;
return true;
////
incos[0] = CreateJobVehicle(7,428,1361.6652,-1635.2184,13.5076,272.1388,-1, -1, RES_CAR_TIME); // Машина1
CreateJobVehicle(7,428,1361.7642,-1642.9727,13.5084,273.5148,-1, -1, RES_CAR_TIME); // Машина2
CreateJobVehicle(7,428,1361.7140,-1650.7054,13.5074,272.9565,-1, -1, RES_CAR_TIME); // Машина3
incos[1] = CreateJobVehicle(7,428,1361.6759,-1658.6383,13.5077,272.2585,-1, -1, RES_CAR_TIME); // Машина4
