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

Started by SA:MP, May 19, 2023, 03:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FrankJScott

In response to the lady talking about nonton pertandingan, bermain sepak bola, hasil bola terbaru, skor liga 2, update bola terkini, skor pertandingan bola, pertandingan bola liga 1 hari ini, bola bg, livescore jadwal bola malam ini, yang main bola sekarang,  I highly recommend this awesome bwf livescore link or jadwal sepak bola liga eropa, livescore bola langsung, pemain bola dari indonesia, berita bola terbaru, sepak indonesia, transfer pemain sepak bola, bola skor indonesia, liga indonesia liga 1, bola bola sepak, skor sekarang, together with this my response about bwf livescore url and don't forget jadwal sepak bola hari ini liga 1, live skor bola sekarang, aplikasi pertandingan sepak bola, main bola sekarang, bola 2, skor bola indonesia, berita main bola, berita skor bola hari ini, daftar main bola indonesia, skor bola hari ini, bearing in mind this total stranger about sepak bola link which is also great. Also, have a look at this find for bwf livescore blog not to mention sepak bola fc, jadwal pertandingan bola malam ini live, skor live indonesia, transfer pemain bola liga 1, real madrid 26, pertandingan bola indonesia, pemain bola dari i, sepak bola tim, sepak bola main, main bola sekarang, not to mention this the full report about livescore advice not forgetting sites such as indonesia langsung, pertandingan bola hari ini liga champions, dasar bermain sepak bola, vs real madrid, liga satu indonesia,  see about not forgetting sites such as pemain bola yang terbaik, informasi sepak bola, skor bola hari ini, event sepak bola, lihat pertandingan sepak bola,  for good measure. Check more @ Excellent 322 Toto Site 031132f

FrankJScott

In reply to the person inquiring about pembayaran online adalah, bank mandiri di malaysia, cara mentransfer dari bank bri ke dana, transaksi gopay, cara mengisi saldo deposit, cara daftar di bank mandiri, ini bank, cara e money, cara daftar bank mandiri, mengisi saldo e money,  I highly suggest this more about the author on 322 toto site or daftar bank bni, situs slot bank mandiri online 24 jam, apk pembayaran, dana bri, link aja daftar, semua transaksi, cara transfer dari bri ke bca, cara transfer bca ke bank mandiri, transfer bank bni, slot bank mandiri, together with this check this out about 322 toto blog alongside all cara transfer melalui bank mandiri, cara buat akun link aja, cara transfer link aja ke shopee, cara transfer bank bri, cara saldo, cara transfer dari bca ke bank mandiri, cara mengisi e money, cara mengisi dana, informasi tentang bank mandiri, untuk pembayaran, alongside all this continue reading this on 322TOTO info which is also great. Also, have a look at this top rated 322TOTO link on top of cara transfer lewat mobile banking, tf bank bca ke mandiri, cara buat bank bni online, cara transfer bank bca ke bank mandiri, tentang link aja, cara transfer bank bca ke bri, website pembayaran, cara mengisi e money, cara tf banking bri ke dana, cara deposit dana ke slot, bearing in mind this cool 322TOTO advice which is worth considering with i bca banking, cara transfer rekening bca ke bri, cara transfer bank mandiri ke bri, cara daftar di link aja, aplikasi bank bri,  her latest blog on not to mention dn pulsa, bank online terbaik, bank bni online, cara mengisi saldo di akun dana, bantuan dari bank bri,  for good measure. Check more @ Top Rated Natural Pet Supplements Blog 9d68456

FrankJScott

In response to the lady inquiring about dog walk hot weather, pet & care, dog and water, dog care in summer, dog on the car, dog boarding in, about your dog, ensure for dogs, dog training tips, summer dog bandanas,  I highly suggest this awesome natural pet supplements forum or dogs on a walk, select your pet, dog your dog, cooling matts for dogs, dog boarding in your home, outside dog care, cooling mat for dogs outdoors, dogs dogs for adoption, fresh water bowl for dogs, pet dachshund, not forgetting sites such as this that guy on natural pet supplements site not to mention training dog boarding, outdoor cooling dog water bowl, dog and a cat, my dog s, dog beds for the summer, dog temperature, tips for dog owners, cool products for dogs, the right dog, extreme heat and dogs, not forgetting sites such as this high rated natural pet supplements advice which is also great. Also, have a look at this learn more here on natural pet supplements info together with dog in hot car what to do, dog panting how to cool down, dog stays, hot summer dog, water dog care, best cooling mat for dogs outside, dog on clean, dog beds for outside use, best dog beds for large dog, a dog a dog a dog, bearing in mind this weblink about natural pet supplements advice alongside all dog is overheating, your pup and i, extreme heat and dogs, dog to do, dog it all,  additional resources on together with pet & care, best dog for home, training your dog, a bed for dogs, a short dog,  for good measure. Check more @ Recommended Male Regenerative Aesthetics Sarasota Site c957190

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...1.97589236 }
  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!