Something not that, help please
#1

Generally I made for two armies that bandits would steal from them materials on the ALT key, but now from army which can take materials in San Fierro the military. How to make that all would work? and military couldn't take materials

PHP код:
    if(newkeys == 1024 && IsPlayerInRangeOfPoint(playerid,1.0,223.8502,1931.5122,17.6406)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,112.7323,1875.2440,17.8359)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,190.7502,1931.7085,17.6406)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,155.8935,1903.3306,18.6603)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,137.4635,1880.8014,17.8359)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,117.9774,1869.8710,17.8359)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,153.5131,1845.9530,17.6406)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,171.9801,1834.7606,17.6406)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,176.9783,1841.3126,17.6406)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,233.3041,1842.0875,17.640) && (IsGang(playerid) || IsMafia(playerid)))
    {
        if(
WAREHOUSE[TEAM_LVA] < 3001) return SCM(playeridCOLOR_GREY"Склад военных пуст!");
        if(
PlayerInfo[playerid][pMats] >= 500) return SCM(playeridCOLOR_GREY"Вы не можете взять больше материалов!");
        new 
randmats 10 random(20);
        if(
PlayerInfo[playerid][pMats]+randmats 500PlayerInfo[playerid][pMats] = 500;
        else 
PlayerInfo[playerid][pMats] += randmats;
        
SCM(playeridCOLOR_BLUE"Вы взяли несколько комплектов материалов!");
        
WAREHOUSE[TEAM_LVA]-= randmats;
        
SetOtherInt("LVA",WAREHOUSE[TEAM_LVA]);
        new 
mes[128];
        
format(messizeof(mes),"+%d\nCOMPONENT OF WEAPONS"randmats);
        
GameTextForPlayer(playeridmes10004);
    }
    if(
newkeys == 1024 && IsPlayerInRangeOfPoint(playerid,1.0,-1297.3777,505.1444,11.1953)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,-1405.5594,502.5779,11.1953)
    || 
IsPlayerInRangeOfPoint(playerid,1.0,-1336.0455,500.4789,11.3047) && (IsGang(playerid) || IsMafia(playerid)))
    {
        if(
WAREHOUSE[TEAM_LVA] < 3001) return SCM(playeridCOLOR_GREY"Склад военных пуст!");
        if(
PlayerInfo[playerid][pMats] >= 500) return SCM(playeridCOLOR_GREY"Вы не можете взять больше материалов!");
        new 
randmats 10 random(20);
        if(
PlayerInfo[playerid][pMats]+randmats 500PlayerInfo[playerid][pMats] = 500;
        else 
PlayerInfo[playerid][pMats] += randmats;
        
SCM(playeridCOLOR_BLUE"Вы взяли несколько комплектов материалов!");
        
WAREHOUSE[TEAM_SFA]-= randmats;
        
SetOtherInt("LSA",WAREHOUSE[TEAM_SFA]);
        new 
mes[128];
        
format(messizeof(mes),"+%d\nCOMPONENT OF WEAPONS"randmats);
        
GameTextForPlayer(playeridmes10004);
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)