[HELP PLEASE] Weapon System
#7

Also that:

Код:
if (strcmp("/createspas12", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,10,848.5450,-1360.4960,13.5469))//Spas12
        {
            new weapons[2];
            GetPlayerWeaponData(playerid, 3, weapons[0], weapons[1]);
            if(weapons[0] != 0)
            {
                if(GetPlayerMoney(playerid) < 22500) return SendClientMessage(playerid, 0xAFAFAFAA, "You don't have enough cash to create that weapon.");
                GivePlayerWeapon(playerid, 27, 60);
                PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-22500;
                GivePlayerMoney(playerid, -22500);
                SendClientMessage(playerid,0xFF9900AA,"You have created a brand new {FF6347}Combat Shotgun {FF9900}for 22500$");
                ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
                return 1;
            }
            else return SendClientMessage(playerid, 0xAFAFAFAA, "You are already carrying a weapon in that slot");
        }
        else return SendClientMessage(playerid, 0xAFAFAFAA, "You are not near the High Armory Depot !");
    }
    if (strcmp("/createsniper", cmdtext, true, 10) == 0)
	{
		if(IsPlayerInRangeOfPoint(playerid,10,848.5450,-1360.4960,13.5469))//Sniper
		{
             new weapons[2];
             GetPlayerWeaponData(playerid, 6, weapons[0], weapons[1]);
             if(weapons[0] != 0)
             {
                if(GetPlayerMoney(playerid) < 22500) return SendClientMessage(playerid, 0xAFAFAFAA, "You don't have enough cash to create that weapon.");
                GivePlayerWeapon(playerid, 34, 50);
                PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-22500;
                GivePlayerMoney(playerid, -22500);
                SendClientMessage(playerid,0xFF9900AA,"You have have created a brand new {FF6347}Sniper Rifle {FF9900}for 22500$");
                ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
                return 1;
             }
             else return SendClientMessage(playerid, 0xAFAFAFAA, "You are already carrying a weapon in that slot");
		}
		else return SendClientMessage(playerid, 0xAFAFAFAA, "You are not near the High Armory Depot !");
    }
I copied the same you made but with sniper, it didnt work, what do I have to modify each time I wanna do it for another weapon?
Reply


Messages In This Thread
[HELP PLEASE] Weapon System - by alainchaccour - 29.08.2011, 10:30
Re: [HELP PLEASE] Weapon System - by Pinguinn - 29.08.2011, 10:33
Re: [HELP PLEASE] Weapon System - by alainchaccour - 29.08.2011, 10:34
Re: [HELP PLEASE] Weapon System - by alainchaccour - 29.08.2011, 10:36
Re: [HELP PLEASE] Weapon System - by [HiC]TheKiller - 29.08.2011, 10:43
Re: [HELP PLEASE] Weapon System - by alainchaccour - 29.08.2011, 10:48
Re: [HELP PLEASE] Weapon System - by alainchaccour - 29.08.2011, 10:56
Re: [HELP PLEASE] Weapon System - by Pinguinn - 29.08.2011, 11:05
Re: [HELP PLEASE] Weapon System - by alainchaccour - 29.08.2011, 11:28
Re: [HELP PLEASE] Weapon System - by alainchaccour - 29.08.2011, 16:51

Forum Jump:


Users browsing this thread: 1 Guest(s)