Some help please?
#1

When i try to take order from hq hitman, this comand don't work for this group, i need some help. Please.
PHP код:
CMD:order(playeridparams[])
{
    if(
playerVariables[playerid][pGunLicense] >= 1)
    {
        if(
playerVariables[playerid][pGroup] == || playerVariables[playerid][pGroup] == || playerVariables[playerid][pGroup] == || playerVariables[playerid][pGroup] == || playerVariables[playerid][pGroup] == 10 || playerVariables[playerid][pGroup] == 11)
        {
            new 
amount;
            if(
sscanf(params"d",amount))
            {
                
SendClientMessage(playeridCOLOR_GREYSYNTAX_MESSAGE"/order [item]");
                
SendClientMessage(playeridCOLOR_GREY"Order 1: Deagle");
                
SendClientMessage(playeridCOLOR_GREY"Order 2: AK47");
                
SendClientMessage(playeridCOLOR_GREY"Order 3: M4A1");
                
SendClientMessage(playeridCOLOR_GREY"Order 4: MP5");
                
SendClientMessage(playeridCOLOR_GREY"Order 5: Rifle");
            }
            else if(
IsPlayerConnectedEx(playerid))
            {
                if(
groupVariables[playerVariables[playerid][pGroup]][gSafe][1] >= 5000)
                {
                    if(
playerVariables[playerid][pMoney] >= 2000)
                    {
                        if(
IsPlayerInRangeOfPoint(playerid100.0groupVariables[playerVariables[playerid][pGroup]][gGroupInteriorPos][0], groupVariables[playerVariables[playerid][pGroup]][gGroupInteriorPos][1], groupVariables[playerVariables[playerid][pGroup]][gGroupInteriorPos][2]))
                        {
                            if(
amount == 1)
                            {
                                
GivePlayerWeapon(playerid249999);
                                
playerVariables[playerid][pWeapons][0] = 24;
                                
playerVariables[playerid][pMoney] -= 1000;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][1] -= 500;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][0] += 1000;
                                
SCM(playeridCOLOR_WHITE,"Ai cumparat un Deagle cu 1.000$. 500 de materiale au fost retrase din seiful factiunii.");
                            }
                            else if(
amount == 2)
                            {
                                
GivePlayerWeapon(playerid309999);
                                
playerVariables[playerid][pWeapons][1] = 30;
                                
playerVariables[playerid][pMoney] -= 1250;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][1] -= 750;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][0] += 1250;
                                
SCM(playeridCOLOR_WHITE,"Ai cumparat un AK47 cu 1.250$. 750 de materiale au fost retrase din seiful factiunii.");
                            }
                            else if(
amount == 3)
                            {
                                
GivePlayerWeapon(playerid319999);
                                
playerVariables[playerid][pWeapons][2] = 31;
                                
playerVariables[playerid][pMoney] -= 1500;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][1] -= 1000;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][0] += 1500;
                                
SCM(playeridCOLOR_WHITE,"Ai cumparat un M4A1 cu 1.500$. 1.000 de materiale au fost retrase din seiful factiunii.");
                            }
                            else if(
amount == 4)
                            {
                                
GivePlayerWeapon(playerid299999);
                                
playerVariables[playerid][pWeapons][3] = 29;
                                
playerVariables[playerid][pMoney] -= 1750;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][1] -= 1500;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][0] += 1750;
                                
SCM(playeridCOLOR_WHITE,"Ai cumparat un MP5 cu 1.750$. 1.500 de materiale au fost retrase din seiful factiunii.");
                            }
                            else if(
amount == 5)
                            {
                                
GivePlayerWeapon(playerid339999);
                                
playerVariables[playerid][pWeapons][4] = 33;
                                
playerVariables[playerid][pMoney] -= 2000;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][1] -= 1750;
                                
groupVariables[playerVariables[playerid][pGroup]][gSafe][0] += 2000;
                                
SCM(playeridCOLOR_WHITE,"Ai cumparat un Riffle cu 2.000$. 1.750 de materiale au fost retrase din seiful factiunii.");
                            }
                            else
                            {
                                
SCM(playerid,COLOR_WHITE,"Invalid order id.");
                            }
                        }
                    }
                    else return 
SCM(playeridCOLOR_WHITE"Nu ai destui bani.");
                }
                else return 
SCM(playeridCOLOR_WHITE"Nu poti cumpara arme deoarece factiunea ta nu are suficiente materiale.");
            }
        }
        if(
playerVariables[playerid][pGroup] == 12)
        {
            if(
IsPlayerInRangeOfPoint(playerid35.0773.8241,-49.5217,1000.5859))
            {
                
GivePlayerWeapon(playerid349999);
                
GivePlayerWeapon(playerid239999);
                
GivePlayerWeapon(playerid49999);
                
playerVariables[playerid][pWeapons][0] = 34;
                
playerVariables[playerid][pWeapons][1] = 23;
                
playerVariables[playerid][pWeapons][2] = 4;
            }
        }
    }
    else
    {
        
SCM(playeridCOLOR_TEAL"You don't have the gun license");
    }
    return 
1;
}
public 
OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
    new 
string[128], victim[MAX_PLAYER_NAME], attacker[MAX_PLAYER_NAME];
    new 
weaponname[24];
    
GetPlayerName(playeridattackersizeof (attacker));
    
GetPlayerName(damagedidvictimsizeof (victim));
    
GetWeaponName(weaponidweaponnamesizeof (weaponname));
    foreach(
Playerz)
    {
        if(
playerVariables[z][pSpectating] == playerid)
        {
            
format(stringsizeof(string), "%s has made %.0f damage to %s, weapon: %s"attackeramountvictimweaponname);
            
SendClientMessage(z,COLOR_REDstring);
        }
    }
    return 
1;

Reply


Messages In This Thread
Some help please? - by GabiXx - 21.12.2015, 17:12
Re: Some help please? - by Mencent - 21.12.2015, 17:53
Re: Some help please? - by GabiXx - 21.12.2015, 17:57
Re: Some help please? - by Mencent - 21.12.2015, 17:58
Re: Some help please? - by GabiXx - 21.12.2015, 18:00
Re: Some help please? - by Mencent - 21.12.2015, 18:02
Re: Some help please? - by GabiXx - 21.12.2015, 18:14
Re: Some help please? - by GabiXx - 21.12.2015, 22:19
Re: Some help please? - by saffierr - 21.12.2015, 22:33
Re: Some help please? - by GabiXx - 21.12.2015, 23:05

Forum Jump:


Users browsing this thread: 4 Guest(s)