[Tutorial] How to open shops interiors! and make a system!

Started by SA:MP, May 19, 2023, 07:06 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

FrankJScott

For the person talking about riboflavin ip, amino tryptophan, sglt1 inhibitors mechanism of action, as amino acid, p7c3 for sale, side effects of methenamine hippurate, glucono, amino acids purpose, rapamycin, gene expression epigenetics,  I highly suggest this the full details on amino acid advice or amino acids a, autophagy mtor, cfse staining, t3 t4 receptors, body amino acids, omeprazole proton pump inhibitors, chloramphenicol microbiology, kinase receptor, chlorophyllin sodium copper salt, 200mg dhea, as well as this useful amino acid link bearing in mind epigenetic cancer drugs, rdrp inhibitors, cck8, enclomiphene citrate results, pi3k delta inhibitor, ha peptide sequence, antibiotic resistance organisms, desmopressin drug, purpose of calcium channel blockers, arb neprilysin inhibitor, not forgetting sites such as this top rated amino acid forum which is also great. Also, have a look at this this guy for amino acid advice not forgetting sites such as asp aspartic acid, dna damage and repair mechanism pdf, desmopressin structure, pkc inhibitor, s1p receptor, d aspartic acid testosterone, brigatinib alk, deoxy d, human equivalent dose formula, dexpanthenol vitamin, which is worth considering with this recommended amino acid site together with increased dhea, amino derivatives, adrenal gland dhea, list of anti biotics, body amino acids,  get the facts about on top of mu receptor opioid, dna repair protein, virtual screening drug discovery, oxalo acetic acid, vitamin e tpgs supplier,  for good measure. Check more @ Top Penile Treatment Sarasota Blog 2f8d49c

FrankJScott

In response to the man inquiring about best facial treatment, led red light therapy for face, brow lines botox, best wrinkle filler injections, facial rejuvenation, the therapy skin care, laser face lift, wrinkle skin treatment, microneedling skin care, p injection,  I highly recommend this high rated non-invasive erectile dysfunction solutions sarasota blog or face laser skin tightening, chemical peels body, reduce frown lines, facial lines and wrinkles, botox on chin lines, derma peel treatment, skin botox, co2 lift facial, treatment for body, best treatment for facial lines, not to mention this their explanation on penile rejuvenation therapy in sarasota url bearing in mind most effective wrinkle filler, dermal injections, botox can be used for, prp vampire treatment, facial skin tightening treatments, best laser for face tightening, best light treatment for wrinkles, skin lifting, lip filler good, botox and frown lines, as well as this how you can help about pshot services sarasota forum which is also great. Also, have a look at this a total noob on male regenerative aesthetics sarasota tips and don't forget about face laser, botox done, facial treatments to reduce wrinkles, dermal filler injections, red light therapy and dermal fillers, best tightening skin care, saggy chin treatment, treatment after botox, botox forehead lines before and after, chemical peels, not to mention this excellent platelet rich plasma therapy for men sarasota tips alongside all best facial treatment for smooth skin, botox on chin lines, led red light facial, face laser facial, botox face lift,  get the facts for as well as frown lines dermal filler, micro needling skin treatment, male dermal fillers before and after, skin fillers for wrinkles, botox enhancement,  for good measure. Check more @ Cool Prp Therapy For Mens Sexual Health Sarasota Tips 9571905

SA:MP

[Tutorial] How to open shops interiors! and make a system!

Hi This is my first tutorial in this tutorial i am going to show you how do you can open shop interior.

Shops interiors coord,ids from here: http://weedarr.wikidot.com/interior pickups ids from here:http://weedarr.wikidot.com/pickups weapons ids from here:https://sampwiki.blast.hk/wiki/Weapons



You'll need to type /save <text> in game to create a enter pickup for the shops also for the exit

and you'll find it in documents/GTA SAN ANDREAS USER FILES/SAMP/savedpositions

Let's begin

You'll need to add a pickup like this


Code:

// The entry pickup
new AmmuPickupEntry;

// The exit pickup
new AmmuPickupExit;

public OnGameModeInit() {
    // 1318 is the pickup model ID, followed by the coordinates in the world
    AmmuPickupEntry = CreatePickup(1318, 1, 1367.8782, -1279.7295, 13.5469);

    // And this is the exit pickup that exists inside the store
    AmmuPickupExit = CreatePickup(1318, 1, 285.3757, -41.3928, 1001.5156);
}

Step 2:

Now the pickups is created sucessfully now we will need to make what players will be teleported to if he stand on the pickups


Code:

You'll need to go to OnPlayerPickUpPickUp
}
if(pickupid == ammupickupentry)//LS Enter ammu market the pickup that we've created
  {
      SetPlayerPos(playerid, 286.1017,-41.8042, 1001.5156);// if the player stand on it he gets teleported to ammu coord
      SetPlayerInterior ( playerid, 1 );// and we set him into ammu-natioin id you can get both of this in http://weedarr.wikidot.com/interiornl646...6.84451779 }
  if(pickupid == ammuoutpickupexit)//LS exit ammu market the exit pickup that we've created
  {
      SetPlayerPos(playerid, 1364.8909,-1279.5602,13.5469);// if the player stand on it he gets teleported to out of ammu you can teleport him the place that you want by /save <text>
      SetPlayerInterior (playerid, 0);// here we get the player out of interior by setting his interior to 0
  }

Step 3:

Now it's done and players can gets into the ammu-nation!

Let's add a checkpoint by entering it let them buy weapons!


Code:

We will have to add
new ammuCP;// you can add it before ongamemodeinit
Now we go to the ammu-nation type /save in the place that we want to put the Checkpoint
After that we go to OnGamodeinit
ammuCP= CreateDynamicCP(296.6336,-38.0615,1001.5156,2,-1,-1,-1);// now we've created the cp Just put your X,y,z dont touch anything else
After that go to your dialog defines!
type
#Define DIALOG_AMMU 788// if you have this in your gamemode so change it to another id
After that go to OnPlayerEnterDynamicCP
}
if(checkpointid == ammuCP)// now we will create what happens if player enter this checkpoint dialog will appear i've just added few Weapons you can add what you want
{
format(str, 956, "Sawn-off\nCombat Shotgun.nMicro SMG\nMP5\nAK47\nM4\nTec9\nSniper Rifle\nDetonator\nDesert Eagle\nBody Armour\nMinigun\n");
  ShowPlayerDialog(playerid, DIALOG_AMMU, DIALOG_STYLE_LIST, "{FF0000}Ammu-Nation", str, "Confirm", ".: Close :.");
  }
The Pickups is done also the Checkpoint also the Dialog

Step 4:

So now we'll go to OnDialogResponse


Code:

if(dialogid == DIALOG_AMMU)
{
    if(response)
    {
        if(listitem == 0)// Sawn-off
{
    if(GetPlayerMoney(playerid) < 12000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");// We will check if the player have 12k to buy sawn-off if he dont have, we will send him message! that he cant buy it
    GivePlayerWeapon(playerid, 26, 100);// this function is used to giveplayerweapon(playerid, 26 is the weapon id, 100 is the ammo
        GivePlayerMoney(playerid, -12000);// now we will take from the player 12k
          GameTextForPlayer(playerid,"~r~-12000~g~$",5000,1);// this is a gametext for player will appear when he buy sawn-off
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: Sawnoff Shotgun");//a message will appear

}
if(listitem == 1)//Combat Shotgun
{
    if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    GivePlayerWeapon(playerid, 27, 50);
        GivePlayerMoney(playerid, -10000);
          GameTextForPlayer(playerid,"~r~-10000~g~$",5000,1);
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: Combat Shotgun");
    }
    if(listitem == 2)//Micro SMG
    {
        if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    GivePlayerWeapon(playerid, 28, 400);
        GivePlayerMoney(playerid, -6000);
          GameTextForPlayer(playerid,"~r~-6000~g~$",5000,1);
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: Micro SMG");
    }
    if(listitem == 3)//MP5
    {
        if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    GivePlayerWeapon(playerid, 29, 300);
        GivePlayerMoney(playerid, -15000);
          GameTextForPlayer(playerid,"~r~-15000~g~$",5000,1);
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: MP5");
}
if(listitem == 4)// M4
{
                if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    GivePlayerWeapon(playerid, 30, 600);
        GivePlayerMoney(playerid, -20000);
          GameTextForPlayer(playerid,"~r~-20000~g~$",5000,1);
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: M4");
    }
    if(listitem == 5)//tec9
    {
        if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    GivePlayerWeapon(playerid, 32, 500);
        GivePlayerMoney(playerid, -4000);
          GameTextForPlayer(playerid,"~r~-4000~g~$",5000,1);
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: Tec9");
}
if(listitem == 6)//Sniper Rifle
{
    if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    GivePlayerWeapon(playerid, 34, 100);
        GivePlayerMoney(playerid, -15000);
          GameTextForPlayer(playerid,"~r~-15000~g~$",5000,1);
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: Sniper Rifle");
    }
    if(listitem == 7)//Detonator
    {
        if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    GivePlayerWeapon(playerid, 40, 5);
        GivePlayerMoney(playerid, -25000);
          GameTextForPlayer(playerid,"~r~-25000~g~$",5000,1);
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: Detonator");
  }
    if(listitem == 8)//Desert eagle
    {
        if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    GivePlayerWeapon(playerid, 24, 300);
        GivePlayerMoney(playerid, -20000);
          GameTextForPlayer(playerid,"~r~-25000~g~$",5000,1);
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: Desert Eagle");
}
if(listitem == 9)//body armour
{
    if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    SetPlayerArmour(playerid, 100);
GameTextForPlayer(playerid,"~r~-2000~g~$",5000,1);
SendClientMessage(playerid, 0x22B998AA,"You Bought: Body Armour");
}
if(listitem == 10)//Minigun
{
    if(GetPlayerMoney(playerid) < 150000) return SendClientMessage(playerid, COLOR_RED, "Error: {FFFFFF} You don't have enough money!");
    GivePlayerWeapon(playerid, 38, 20);
        GivePlayerMoney(playerid, -150000);
          GameTextForPlayer(playerid,"~r~-150000~g~$",5000,1);
    SendClientMessage(playerid, 0x22B998AA,"You Bought Weapon: Minigun");
return 1;
}
}
}

This was my first tutorial here i hope i can have time making more tutorials!

Give Feedbacks!

Also if there's something i didn't explain you can tell me in the comments i will edit it asap!

Note: you dont have to use the same colors that i've typed you can use your own colors in your gamemode that you've defined

Source: [Tutorial] How to open shops interiors! and make a system!