[FS/MAP] Ultimate Park (UBACIO SAM SLIKE!)

Započeo [AG] N1n0, Septembar 21, 2010, 23:12:07 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

ovako napravim ja dve trafike iz tvoje FS,ali kad postavi m vise od jedne ne izbaci mi meni za kupiti trafika i ostali objekti budu tu ali ne i meni za kupiti mozete li mi pomoci posto hocu da ove trafike raspodelim po selome LS hvala na pomoci unapred


#include <a_samp>
new pickup;
#define LJUBICASTO 0xC2A2DAAA
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
public OnFilterScriptInit()
{
pickup = CreatePickup(1239, 24,  1537.9000244141,-1656,13.5);
CreateObject(1571,1539.50000000,-1655.30004883,13.89999962,0.00000000,0.00000000,286.00000000); //object(cj_noodle_1) (1)
CreateObject(3061,1540.80004883,-1657.00000000,13.89999962,0.00000000,0.00000000,106.00000000); //object(ad_flatdoor) (1)
}
public OnFilterScriptExit()
{
   return 1;
}

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, 0xF0F0F0FF, "Great man >>N1n0<< made this FS");
   return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp("/buy", cmdtext, true, 10) == 0)
   {
      if(PlayerToPoint(5.0,playerid,1537.9000244141,-1656,13.5))
        {
      ShowPlayerDialog(playerid,2000,DIALOG_STYLE_LIST,"Izaberi:","Beer (65$)\nCoca Cola (65$)\nHot Dog (70$)\nHamburger (80$)","Izaberi","Zatvori");
      }
      return 1;
   }
   return 0;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == pickup)
   {
    GameTextForPlayer(playerid, "~w~Write ~r~/buy ~w~to buy something!", 3500, 5);
   }
   return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   new string[128];
   new ime[MAX_PLAYER_NAME];
   GetPlayerName(playerid, ime, sizeof(ime));
   new Float:zivot;
   GetPlayerHealth(playerid, zivot);
    if(dialogid == 2000)
   {
   if(response)
   {
   if(listitem == 0)
   {
     format(string, sizeof(string), "%s is buyed Beer!", ime);
     SendClientMessage(playerid, LJUBICASTO, string);
     GivePlayerMoney(playerid,-65);
     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
   }

   if(listitem == 1)
   {
   format(string, sizeof(string), "%s is buyed Coca Cola!", ime);
   SendClientMessage(playerid, LJUBICASTO, string);
   GivePlayerMoney(playerid,-65);
   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
   }

   if(listitem == 2)
     {
     format(string, sizeof(string), "%s is buyed Hot Dog and eat it!", ime);
     SendClientMessage(playerid, LJUBICASTO, string);
     GivePlayerMoney(playerid,-70);
     SetPlayerHealth(playerid, zivot + 10.0);
      }

    if(listitem == 3)
    {
      format(string, sizeof(string), "%s is buyed Hamburger and eat it!", ime);
      SendClientMessage(playerid, LJUBICASTO, string);
      GivePlayerMoney(playerid,-80);
      SetPlayerHealth(playerid, zivot + 15.0);
      }
   }
   return 1;
    }
    return 0;
}

public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
   {
      new Float:oldposx, Float:oldposy, Float:oldposz;
      new Float:tempposx, Float:tempposy, Float:tempposz;
      GetPlayerPos(playerid, oldposx, oldposy, oldposz);
      tempposx = (oldposx -x);
      tempposy = (oldposy -y);
      tempposz = (oldposz -z);
      if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
      {
         return 1;
      }
   }
   return 0;
}
ovo je naprimer druga


#include <a_samp>
new pickup;
#define LJUBICASTO 0xC2A2DAAA
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
public OnFilterScriptInit()
{
pickup = CreatePickup(1239, 24,  1465.9000244141,-1043,23.799999237061);
CreateObject(3061,1464.00000000,-1045.69995117,24.20000076,0.00000000,0.00000000,0.00000000); //object(ad_flatdoor) (1)
CreateObject(1571,1466.00000000,-1044.90002441,24.20000076,0.00000000,0.00000000,179.99993896); //object(cj_noodle_1) (1)
}
public OnFilterScriptExit()
{
   return 1;
}

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, 0xF0F0F0FF, "Great man >>N1n0<< made this FS");
   return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp("/buy", cmdtext, true, 10) == 0)
   {
      if(PlayerToPoint(5.0,playerid,1465.9000244141,-1043,23.799999237061))
        {
      ShowPlayerDialog(playerid,2000,DIALOG_STYLE_LIST,"Izaberi:","Beer (65$)\nCoca Cola (65$)\nHot Dog (70$)\nHamburger (80$)","Izaberi","Zatvori");
      }
      return 1;
   }
   return 0;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == pickup)
   {
    GameTextForPlayer(playerid, "~w~Write ~r~/buy ~w~to buy something!", 3500, 5);
   }
   return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   new string[128];
   new ime[MAX_PLAYER_NAME];
   GetPlayerName(playerid, ime, sizeof(ime));
   new Float:zivot;
   GetPlayerHealth(playerid, zivot);
    if(dialogid == 2000)
   {
   if(response)
   {
   if(listitem == 0)
   {
     format(string, sizeof(string), "%s is buyed Beer!", ime);
     SendClientMessage(playerid, LJUBICASTO, string);
     GivePlayerMoney(playerid,-65);
     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
   }

   if(listitem == 1)
   {
   format(string, sizeof(string), "%s is buyed Coca Cola!", ime);
   SendClientMessage(playerid, LJUBICASTO, string);
   GivePlayerMoney(playerid,-65);
   SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
   }

   if(listitem == 2)
     {
     format(string, sizeof(string), "%s is buyed Hot Dog and eat it!", ime);
     SendClientMessage(playerid, LJUBICASTO, string);
     GivePlayerMoney(playerid,-70);
     SetPlayerHealth(playerid, zivot + 10.0);
      }

    if(listitem == 3)
    {
      format(string, sizeof(string), "%s is buyed Hamburger and eat it!", ime);
      SendClientMessage(playerid, LJUBICASTO, string);
      GivePlayerMoney(playerid,-80);
      SetPlayerHealth(playerid, zivot + 15.0);
      }
   }
   return 1;
    }
    return 0;
}

public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
   {
      new Float:oldposx, Float:oldposy, Float:oldposz;
      new Float:tempposx, Float:tempposy, Float:tempposz;
      GetPlayerPos(playerid, oldposx, oldposy, oldposz);
      tempposx = (oldposx -x);
      tempposy = (oldposy -y);
      tempposz = (oldposz -z);
      if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
      {
         return 1;
      }
   }
   return 0;
}
Molim vas pomagajteeee :D




forum.sa-mp.com info:
Over 1000 posts.
Over 50 reputation.

Dobro je samo tako nastavi 9/10
IP: 193.192.59.227:7785
Troll Or Be Trolled !
Hoce neko lol-a?!