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

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FrankJScott

For the lady asking about situs joker gaming, slot 4d terpercaya, agen situs slot online terpercaya, daftar judi slot online terpercaya, mpo agen, permainan casino, tentang judi slot online, kumpulan situs terbaik, slot mpo terbaru, slot asia gaming,  I highly suggest this additional reading on mpo700 link alternatif forum or daftar situs judi terpercaya, situs bonus new member 200, situs live game, situs slot online terbaru, game sabung ayam online, situs judi, bonus new member terbesar, game slot888, link aplikasi slot, bonus 100 new member slot, not forgetting sites such as this web site for slot mpo gacor details on top of masuk game slot online, situs judi slot online terpercaya 2021, situs mpo new member 100, mpo situs, bola bola slot, indo live slot, situs slot pg soft, daftar situs bola terpercaya, asia mpo slot login, situs bonus new member 100, on top of this top slot mpo gacor tips which is also great. Also, have a look at this more about the author on judi mpo link not to mention situs promo new member, slots terbaik, pusat judi slot, slot dengan bonus new member 200, website togel terbaik, permainan game indonesia, indonesia slot 4d, permainan slot online adalah, slot play online, situs web slot terpercaya, and don't forget this go here about mpo700 link alternatif tips as well as slot pragmatic, game slot88 online, situs live slot, website slot, slot habanero,  link for not forgetting sites such as situs slot resmi di indonesia, nama situs judi slot, slot online terpercaya di indonesia, agen slot 4d, game judi online,  for good measure. Check more @ Top Rated Penile Rejuvenation Therapy In Sarasota Blog 1905b2b

FrankJScott

To the man talking about microneedling rejuvenation, facial rejuvenation fillers, co2 lift facial, laser resurfacing therapy, before botox, wrinkles on forehead botox, laser treatment for fat reduction, microneedling and filler, wrinkle treatment without botox, best face peels for wrinkles,  I highly recommend this best male enhancement sarasota advice or laser skin resurfacing what is it, shockwave therapy for skin tightening, wrinkles frown lines, fillers for wrinkles around the mouth, antiaging facial, top skin treatments, derma facial, xeomin wrinkle treatment, botox lines forehead, microneedling skin rejuvenation, not to mention this sell on non-invasive erectile dysfunction solutions sarasota forum and don't forget botox and lip fillers, dermal fillers for forehead lines, micro needling face treatment, best facial procedures, peel for face treatment, best rejuvenating facial treatment, botox anti wrinkle injections, botox for wrinkle prevention, best treatment for smile wrinkles, dermal fillers for lip wrinkles, on top of this a knockout post on penile rejuvenation therapy in sarasota advice which is also great. Also, have a look at this great male regenerative aesthetics sarasota link together with botox tox, face skin care treatment, wrinkle medication, best treatment for fat reduction and skin tightening, best botox products, xeomin used for, frown lines mouth botox, best face fillers, botox units, prp filler injections, together with this right here for pshot injections sarasota advice which is worth considering with the best skin tightening procedure, rf microneedling treatment, body treatments, vampire facial prp, laser treatment for lip wrinkles,  full report on bearing in mind best skin fillers, botox to the forehead, skin injection treatment, laser skin, best at home botox,  for good measure. Check more @ Recommended Penile Rejuvenation Therapy In Sarasota Site 1905b2b

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