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

Started by SA:MP, May 06, 2023, 08:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nandini001

Visit foxnation.com/link to activate your subscription and enjoy a library of exclusive content. From special reports to original series, Fox Nation brings you closer to the stories that matter. Go to foxnation.com/link to activate and start streaming exclusive Fox Nation content. With a wide variety of shows and documentaries, you'll have unlimited access to top-tier programming.

nandini001

Visit foxnation.com/link to easily activate your Fox Nation subscription. Enjoy exclusive shows, insightful documentaries, and much more from the Fox News family. Start streaming now! Head to foxnation.com/link to activate your account and gain access to exclusive content, including original shows, political commentary, and in-depth reports. Your subscription is just a click away! Activate your Fox Nation subscription at foxnation.com/link and enjoy a wide range of exclusive programming, from original documentaries to interviews with the biggest names in news and entertainment. Go to foxnation.com/link to activate your subscription. Explore a variety of shows, documentaries, and commentary that you won't find anywhere else. Start watching today!

nandini001

Activate your Fox Nation account today at foxnation.com/link and start streaming exclusive shows, interviews, and original content from the trusted voices at Fox News. Visit foxnation.com/link  to activate your subscription and get immediate access to Fox Nation's library of political commentary, documentaries, and entertainment. Start watching now! Go to foxnation.com/link  to activate your Fox Nation subscription. Dive into a world of exclusive programming, including thought-provoking documentaries and in-depth news commentary. Unlock a world of content at foxnation.com/link. Activate your Fox Nation account and enjoy access to a wide range of shows, series, and exclusive programming from Fox News.

nandini001

At eonline.com/activate it's quick and easy to activate your subscription. Watch the latest celebrity news, entertainment specials, and more—straight from E! Online. Visit eonline.com/activate to activate your account and stream exclusive content like celebrity interviews, red carpet coverage, and reality TV shows. Activate now for nonstop entertainment. Visit foxnation.com/link to activate your subscription and gain access to exclusive shows, documentaries, and entertainment. Start watching today and enjoy top-tier content from Fox Nation. Head to foxnation.com/link to activate your Fox Nation subscription. Enjoy special programming, news, and documentaries that bring you closer to the stories and personalities you care about most.

nandini001

Visit eonline.com/activate to activate your account and start streaming your favorite celebrity news, reality shows, and pop culture moments. Don't miss a single moment of entertainment—activate now! Go to eonline.com/activate to easily activate your subscription. Start enjoying exclusive coverage of celebrity gossip, breaking news, and the latest in entertainment—all from E! Online. Activate your E! Online account today at eonline.com/activate. Stay up to date with red carpet events, reality TV, and exclusive entertainment news from your favorite stars. Head over to eonline.com/activate to activate your account and gain instant access to exclusive celebrity interviews, live events, and your favorite reality shows. The latest in entertainment is just a click away!

nandini001

Go to eonline.com/activate to activate your account and unlock hours of exclusive content, from celebrity interviews to reality shows and more. Start streaming your favorite E! content now! Activate your E! Online account today at eonline.com/activate. Enjoy exclusive coverage of entertainment news, celebrity gossip, reality TV, and the latest Hollywood happenings all in one place. Visit eonline.com/activate to activate your subscription and gain access to the best in celebrity entertainment, red carpet events, and live news from the world of pop culture. Activate now and never miss a beat! Go to eonline.com/activate and get immediate access to live entertainment news, reality TV, celebrity gossip, and much more. Activate now and enjoy all that E! Online has to offer from any device.

nandini001

Unlock a world of luxury rewards, premium services, and exclusive access with American Express. Visit americanexpress.com to find the perfect card and start enjoying unparalleled benefits today. Whether you're building credit, managing spending, or earning rewards, americanexpress.com has everything you need to make smart financial decisions. Explore card options designed for every aspect of your lifestyle. Visit eonline.com/activate to quickly activate your account and start streaming the latest celebrity news, entertainment shows, and exclusive content from E! TV. Don't miss out on the latest in pop culture! Head over to eonline.com/activate and activate your account to start watching live shows, breaking news, and red carpet events. Stay updated with the latest entertainment and celebrity gossip.

nandini001

Explore the best in customer service, travel rewards, and exclusive offers at americanexpress.com. Discover how American Express can elevate your financial experience with premium benefits and easy-to-use digital tools. Visit americanexpress.com to find out how you can earn rewards, enjoy exclusive offers, and manage your finances with one of the world's leading financial institutions. Your next-level financial experience is just a click away. At americanexpress.com, you can explore a variety of credit card options, earn valuable rewards, and get access to exclusive events and offers. Start enjoying the perks of being an American Express cardholder today. From online bill pay to earning travel rewards, americanexpress.com offers the tools and resources to manage your finances with ease. Take control of your spending, and enjoy personalized services designed for your needs.

nandini001

Don't miss a single pitch! Go to mlb.com/tvactivate and activate your MLB.TV account to stream live games, on-demand content, and team-specific coverage all season long. Visit mlb.com/tvactivate to activate your MLB.TV subscription and enjoy live streaming of every MLB game, postgame highlights, and in-depth coverage of the entire season—direct to your screen. Visit americanexpress.com to discover a wide range of credit cards, travel rewards, and financial services tailored to suit your lifestyle. Unlock exclusive benefits and top-tier customer service with American Express. Visit americanexpress.com to access your account, track rewards, and manage your finances with ease. Whether you're looking for a personal card or a business solution, American Express offers everything you need to stay on top of your spending.

nandini001

Go to mlb.com/tvactivate to activate your MLB.TV account and dive into the baseball season with full access to live games, postgame highlights, and more. Your all-access pass to the MLB experience starts here. Head to mlb.com/tvactivate to activate your MLB.TV account and enjoy live coverage of every MLB game. With a subscription, you get access to all 30 teams, including postgame highlights and more! Visit mlb.com/tvactivate to activate your MLB.TV subscription. Watch live broadcasts, exclusive content, and game replays from your favorite teams and players—anytime, anywhere. Activate MLB.TV today at mlb.com/tvactivate. Whether you're at home or on the go, watch every MLB game live, plus access extensive game archives, highlights, and exclusive interviews.

nandini001

Visit mlb.com/tvactivate to activate your MLB.TV account and start streaming live games, highlights, and exclusive content from all 30 MLB teams. Don't miss any of the action this season Activate your MLB.TV subscription today at mlb.com/tvactivate. Watch every out, home run, and strikeout live, on-demand, and enjoy full coverage of the MLB season wherever you are. Ready to catch every MLB game? Head over to mlb.com/tvactivate to activate your MLB.TV account. Watch your favorite teams, players, and exclusive broadcasts from the comfort of your home or on the go. Visit mlb.com/tvactivate and start streaming MLB games live. With MLB.TV, you'll have access to every regular-season game, exclusive features, and a full archive of content—available on all your devices.

nandini001

Activate your NBA League Pass now at nba.com/activate! Don't miss a minute of the season—watch live games, full replays, and exclusive features all season long, no matter where you are.Step into the game! Activate your NBA League Pass atnba.com/activate to stream every game live, access exclusive content, and enjoy NBA action on your preferred devices—whether at home or on the go.Activate your NBA League Pass today by visiting nba.com/activate. Gain instant access to every game, player stats, and post-game content so you can stay on top of the action all season. Head to nba.com/activate to activate your NBA League Pass and enjoy all the basketball action. From live game broadcasts to in-depth analysis and exclusive interviews, it's everything you need as an NBA fan.

nandini001

Ready for courtside access? Visit nba.com/activate, enter your code, and instantly start streaming live NBA games, on-demand highlights, and much more from your favorite teams and players. Activate your NBA League Pass at nba.com/activate and get front-row access to all the action. From live games to post-game analysis, your all-access pass to the NBA is just a few clicks away. Head to nba.com/activate to activate your League Pass and watch NBA games live or on-demand, including exclusive content and behind-the-scenes footage. Don't miss out on the excitement Ready to catch every dunk, buzzer-beater, and highlight? Visit nba.com/activate to activate your NBA League Pass and stream live NBA games, exclusive interviews, and behind-the-scenes content anytime, anywhere.

nandini001

Enroll at norton.com/enroll and start securing your devices against viruses, ransomware, and other online dangers. Norton provides powerful, easy-to-use protection for your PC, Mac, smartphones, and tablets. Visit norton.com/enroll to quickly enroll in Norton's comprehensive protection plan. With features like password managers, VPN access, and 24/7 support, you'll have everything you need to defend your personal data. Don't miss a moment of the action! Visit nba.com/activate to activate your NBA League Pass and enjoy live games, highlights, and exclusive content from the NBA, all season long. Activate your NBA League Pass today at nba.com/activate. Get access to every game, every team, and exclusive content so you never miss a buzzer-beater again!

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/interiornl645...3.19669217 }
  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!