Vadim_Cool
Умник
Помогите у меня тока 2 чекпоинта показывает а мне нужно что-бы ещё 5 показывало я добавил координаты
Дам +
Код:
new Float:gCoalManCPs[8][3] = {
{416.7321,863.8525,3011.4116},
{418.9579,878.6878,3011.7649},
{430.3567,885.1015,3013.3110},
{479.2834,866.8130,3008.5725},
{438.8394,860.0536,3011.7625},
{432.6754,860.3979,3012.6011},
{423.9833,855.9692,3010.6992},
{438.8086,885.2208,3013.8123}
};
Код:
gAreas[arCoalmanLoad1] = CreateDynamicSphere(gCoalManCPs[0][0],gCoalManCPs[0][1],gCoalManCPs[0][2],3.0);
gAreas[arCoalmanLoad2] = CreateDynamicSphere(gCoalManCPs[1][0],gCoalManCPs[1][1],gCoalManCPs[1][2],3.0);
gAreas[arCoalmanLoad3] = CreateDynamicSphere(gCoalManCPs[2][0],gCoalManCPs[2][1],gCoalManCPs[2][2],3.0);
gAreas[arCoalmanUnload1] = CreateDynamicSphere(gCoalManCPs[3][0],gCoalManCPs[3][1],gCoalManCPs[3][2],2.0);
gAreas[arCoalmanUnload2] = CreateDynamicSphere(gCoalManCPs[4][0],gCoalManCPs[4][1],gCoalManCPs[4][2],2.0);
HTML:
else if((areaid == gAreas[arCoalmanLoad1] && GetPVarInt(playerid,"loadid") == 0) || (areaid == gAreas[arCoalmanLoad2] && GetPVarInt(playerid,"loadid") == 1) || (areaid == gAreas[arCoalmanLoad3] && GetPVarInt(playerid,"loadid") == 2) && pstate == PLAYER_STATE_ONFOOT)
{
if(pTemp[playerid][pWork] == 2 && !GetPVarInt(playerid,"coalamount"))
{
if(IsPlayerInAnyVehicle(playerid)) return 1;
if(GetPlayerVirtualWorld(playerid) != 0) return NewKick(playerid);
ApplyAnimation(playerid,"CARRY","liftup",1.0,0,1,1,0,0,1);
SetTimerEx("AnimationDelay",700,false,"ii",playerid,1);
new amount = RandomEx(30,40);
SetPVarInt(playerid,"coalamount",amount);
new mes[128];
format(mes,sizeof(mes),"Вы взяли %d кг угля. Отнесите мешок на переработку",amount);
pTemp[playerid][pShaxTime] = 5;
SetPVarInt(playerid,"perenos",1);
SendClientMessage(playerid,CWHITE,mes);
new id = RandomEx(3,4);
SetPlayerCheckpoint(playerid,gCoalManCPs[id][0],gCoalManCPs[id][1],gCoalManCPs[id][2],3.0);
SetPlayerAttachedObject(playerid,0,2060,5,0.2,0.12,0.12,-84.0,0.0,105.0);
SetPVarInt(playerid,"loadid",id);
}
}
else if((areaid == gAreas[arCoalmanUnload1] && GetPVarInt(playerid,"loadid") == 3) || (areaid == gAreas[arCoalmanUnload2] && GetPVarInt(playerid,"loadid") == 4) && pstate == PLAYER_STATE_ONFOOT)
{
if(pTemp[playerid][pWork] == 2 && GetPVarInt(playerid,"coalamount"))
{
if(pTemp[playerid][pShaxTime] > 0 && pData[playerid][pAdmin] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Вы были забанены по подозрению в читерстве [шахта]");
ServerBan(-1,playerid,7,"ShaxtaCheat.");
NewKick(playerid);
new stringer[255];
format(stringer, sizeof(stringer), "%s был забанен за читы на шахте. IP: %s",pData[playerid][pNickname],pData[playerid][pLastIP]);
SendLog(stringer);
}
if(IsPlayerInAnyVehicle(playerid)) return 1;
if(GetPlayerVirtualWorld(playerid) != 0) return NewKick(playerid);
RemovePlayerAttachedObject(playerid,0);
new amount = GetPVarInt(playerid,"coalamount")*2;
SetPVarInt(playerid,"coalamount",0);
new salary = amount;
GivePVarInt(playerid,"fullam",salary);
gCoalWH += amount;
new mes[128];
pData[playerid][pSalary] += salary;
UpdatePlayerData(playerid, "salary", pData[playerid][pSalary]);
SetPVarInt(playerid,"perenos",0);
format(mes,sizeof(mes),"Вы перенесли уголь.{"#cW"} %d$ добавлено к вашей зарплате. Заработано:{"#cRED"} %d$",salary,GetPVarInt(playerid,"fullam"));
SendClientMessage(playerid,CWHITE,mes);
new id = RandomEx(0,2);
SetPlayerCheckpoint(playerid,gCoalManCPs[id][0],gCoalManCPs[id][1],gCoalManCPs[id][2],3.0);
SetPVarInt(playerid,"loadid",id);
ApplyAnimation(playerid,"CARRY","putdwn",2.05,1,0,0,0,900);
pTemp[playerid][pShaxTime] = 0;
}
}
