the1sd
Умник
Видел просили многие команду, ложить маты у фургона а не внутри именно.
---------- Post added at 19:42 ---------- Previous post was at 19:41 ----------
Админы прошу исправте название темы, /materials*
PHP:
if(strcmp(cmd,"/materials",true)==0)
{
if(gPlayerLogged[playerid] != false)
{
if(!IsAGang(playerid)) return SendClientMessage(playerid,COLOR_GREY,"Вы не бандит");
new x_nr[60];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "--------=====Помощ=====--------");
SendClientMessage(playerid, COLOR_WHITE, "Используйте: /materials [name]");
SendClientMessage(playerid, COLOR_WHITE, "Доступные названия: Get,Put");
SendClientMessage(playerid, COLOR_WHITE, "===============================");
return 1;
}
if(strcmp(x_nr,"get",true) == 0)
{
if (IsAGang(playerid))
{
if(PlayerToPoint(10.0,playerid,316.8127,-167.5395,999.5938))
{
if(armmatbi == 0)return SendClientMessage(playerid,COLOR_GRAD1,"Склад армии пуст");
SendClientMessage(playerid, 0x6495EDFF, "Вы взяли 250 материалов со склада армии");
PlayerInfo[playerid][pMats] +=250;
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
SetPlayerAttachedObject(playerid, 1 , 2358, 1,0.11,0.36,0.0,0.0,90.0);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
usemats[playerid] = true;
usegruz[playerid] = true;
armmatbi -= 250;
}
}
}
else if(strcmp(x_nr,"put",true) == 0)
{
new nearveh = GetNearestVehicle(playerid);
new carid;
carid = nearveh;
new Float:cx,Float:cy,Float:cz;
GetVehiclePos(carid, cx, cy, cz);
if(!PlayerToPoint(5.0, playerid, cx, cy, cz) ) return SendClientMessage(playerid, COLOR_GREY, "Вы далеко от фургона");
switch(PlayerInfo[playerid][pMember])
{
case 12:
{
if(PlayerInfo[playerid][pMats] < 250)
{
SendClientMessage(playerid,COLOR_GRAD1,"У вас нет материалов");
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
if(Furi[carid-matsfura[0]][gBallas] >= 3000) return SendClientMessage(playerid,COLOR_GRAD1,"Фургон заполнен");
SendClientMessage(playerid, COLOR_WHITE, "Вы положили ящик в фургон");
Furi[carid-matsfura[0]][gBallas] += 250;//
PlayerInfo[playerid][pMats] -=250;
usemats[playerid] = false;
usegruz[playerid] = false;
RemovePlayerAttachedObject(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
ClearAnimations(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
format(string, sizeof(string), "Материалы в фургоне: %d/5000", Furi[carid-matsfura[0]][gBallas]);
SendClientMessage(playerid, COLOR_WHITE, string);
}
case 13:
{
if(PlayerInfo[playerid][pMats] < 250)
{
SendClientMessage(playerid,COLOR_GRAD1,"У вас нет материалов");
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
if(Furi[carid-matsfuravagos[0]][gVagos] >= 3000) return SendClientMessage(playerid,COLOR_GRAD1,"Фургон заполнен");
SendClientMessage(playerid, COLOR_WHITE, "Вы положили ящик в фургон");
Furi[carid-matsfuravagos[0]][gVagos] += 250;//
PlayerInfo[playerid][pMats] -=250;
usemats[playerid] = false;
usegruz[playerid] = false;
RemovePlayerAttachedObject(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
ClearAnimations(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
format(string, sizeof(string), "Материалы: %d/5000", Furi[carid-matsfuravagos[0]][gVagos]);
SendClientMessage(playerid, COLOR_WHITE, string);
}
case 15:
{
if(PlayerInfo[playerid][pMats] < 250)
{
SendClientMessage(playerid,COLOR_GRAD1,"У вас нет материалов");
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
if(Furi[carid-matsfuragrove[0]][gGrove] >= 3000) return SendClientMessage(playerid,COLOR_GRAD1,"Фургон заполнен");
SendClientMessage(playerid, COLOR_WHITE, "Вы положили ящик в фургон");
Furi[carid-matsfuragrove[0]][gGrove] += 250;//
PlayerInfo[playerid][pMats] -=250;
usemats[playerid] = false;
usegruz[playerid] = false;
RemovePlayerAttachedObject(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
ClearAnimations(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
format(string, sizeof(string), "Материалы: %d/5000", Furi[carid-matsfuragrove[0]][gGrove]);
SendClientMessage(playerid, COLOR_WHITE, string);
}
case 17:
{
if(PlayerInfo[playerid][pMats] < 250)
{
SendClientMessage(playerid,COLOR_GRAD1,"У вас нет материалов");
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
if(Furi[carid-matsfuraactek[0]][gAztek] >= 3000)return SendClientMessage(playerid,COLOR_GRAD1,"Фургон заполнен");
SendClientMessage(playerid, COLOR_WHITE, "Вы положили ящик в фургон");
Furi[carid-matsfuraactek[0]][gAztek] += 250;//
PlayerInfo[playerid][pMats] -=250;
usemats[playerid] = false;
usegruz[playerid] = false;
RemovePlayerAttachedObject(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
ClearAnimations(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
format(string, sizeof(string), "Материалы: %d/5000", Furi[carid-matsfuraactek[0]][gAztek]);
SendClientMessage(playerid, COLOR_WHITE, string);
}
case 18:
{
if(PlayerInfo[playerid][pMats] < 250)
{
SendClientMessage(playerid,COLOR_GRAD1,"У вас нет материалов");
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
if(Furi[carid-matsfurarifa[0]][gRifa] >= 3000)return SendClientMessage(playerid,COLOR_GRAD1,"Фургон заполнен");
SendClientMessage(playerid, COLOR_WHITE, "Вы положили ящик в фургон");
Furi[carid-matsfurarifa[0]][gRifa] += 250;//
PlayerInfo[playerid][pMats] -=250;
usemats[playerid] = false;
usegruz[playerid] = false;
RemovePlayerAttachedObject(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
ClearAnimations(playerid, 1);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,1,0);
format(string, sizeof(string), "Материалы: %d/5000", Furi[carid-matsfurarifa[0]][gRifa]);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
return 1;
}
}
}
---------- Post added at 19:42 ---------- Previous post was at 19:41 ----------
Админы прошу исправте название темы, /materials*
