[Pomoc]Komande /enter i /exit

Započeo Tonyx, Januar 23, 2017, 01:19:05 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: BE x8.5
Detaljan opis problema:Kako da napravim da umjesto komandi /enter i /exit bude ulaz na "F".Pokusao sam da zamijenim if(strcmp(cmd, "/enter", true) == 0) sa if( newkeys == KEY_SECONDARY_ATTACK ) Ovo sam stavio pod public OnPlayerKeyStateChange.  I to radi za kuce i bizove a ne za sbizove.Isto sam uradio i sa komandom /exit ali onda izlaz ne radi nikako.
Dio skripte:Evo komande:
if(strcmp(cmd, "/enter", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
if(WantedLevel[playerid] > 0)
                {
                SendClientMessage(playerid, COLOR_GREY, "Imate Wanted ne mozete koristiti to!");
            return 1;
            }
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~g~Dobrodosli kuci", 4000, 4);
HouseInfo[i][hTimer] = 0;
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
HouseEntered[playerid] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Kuca ~w~Zakljucana", 4000, 4);
}
}
}
// *****************************************************************************
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
if(WantedLevel[playerid] > 0)
                {
                SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Imate Wanted ne mozete koristiti to!");
            return 1;
            }
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~w~Firma ~r~zatvorena", 4000, 4);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 4);
return 1;
}
if (PlayerToPoint(3.0, playerid,1199.323974,-918.954528,43.116638))
{
OnPlayerEnterFood(playerid, 5);
}
else if (PlayerToPoint(3.0, playerid,811.321411,-1616.181030,13.546875))
{
OnPlayerEnterFood(playerid, 6);
}
else if (PlayerToPoint(3.0, playerid,927.906250,-1352.942626,13.343750))
{
OnPlayerEnterFood(playerid, 7);
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-$%d~n~~w~kucajte /exit~n~da izadjete", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s je platio $%d da bi usao u firmu %d", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
}
else
{
GameTextForPlayer(playerid, "~r~Nemate dovoljno novca", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,1100.8438)) // novi ammu privatni
{
    GameTextForPlayer(playerid, "~w~Dobrodosli u Prodavnicu oruzja", 3000, 1);
    SetPlayerInterior(playerid,7);
    PlayerInfo[playerid][pInt] = 7;
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
    GameTextForPlayer(playerid, "~w~Dobrodosli u 8ball Track", 5000, 1);
    SetPlayerInterior(playerid,7);
    PlayerInfo[playerid][pInt] = 7;
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
    GameTextForPlayer(playerid, "~w~Dobrodosli na Dirt Track", 5000, 1);
    SetPlayerInterior(playerid,4);
    PlayerInfo[playerid][pInt] = 4;
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
    GameTextForPlayer(playerid, "~w~Dobrodosli na Stunting Track", 5000, 1);
    SetPlayerInterior(playerid,14);
    PlayerInfo[playerid][pInt] = 14;
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
else if (PlayerToPoint(2, playerid,1423.5,-1180.3,26))
{// Gradjevinska firma
    GameTextForPlayer(playerid, "~w~Dobrodosli u Gradjevinsku firmu", 5000, 1);
    SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,447.52,280.4,1027.6);
    PlayerInfo[playerid][pInt] = 0;
TogglePlayerControllable(playerid, 0);
SetTimerEx("UlazuInt",3000, false, "i", playerid);
}
else if (PlayerToPoint(2, playerid,1564,-1330.7,16.45))
{// Skakanje padobranom
if (PadobranZeton[playerid] == 1)
{
    GameTextForPlayer(playerid, "~w~Skakanje padobranom", 3000, 1);
SetPlayerPos(playerid,1548.8,-1363.8,326.22);
GivePlayerWeapon(playerid, 46, 1);
    PadobranZeton[playerid] = 0;
    }
    else
    {
SendClientMessage(playerid, COLOR_GRAD1, "[GRESKA] Nemate zeton !");
}
}
else if (PlayerToPoint(2, playerid,1104.9,-1369.7,13.98))
{// METRO
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~METRO", 3000, 1);
    SetPlayerInterior(playerid,10);
    SetPlayerFacingAngle(playerid, 178.5894);
SetPlayerPos(playerid, 484.96,-2378.81,1121);
    PlayerInfo[playerid][pInt] = 10;
TogglePlayerControllable(playerid, 0);
SetTimerEx("UlazuInt",3000, false, "i", playerid);
}
// *****************************************************************************************
// KAFICI ulaz u kafice

else if (PlayerToPoint(2, playerid,1327.0173,-1547.7502,13.5469))
{// Corner ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~Corner caffe", 3000, 1);
SetPlayerPos(playerid,1326.8635,-1549.0336,13.5469);
}
/*else if (PlayerToPoint(2, playerid,1234.1210,-1423.2371,13.4620))
{// X Club ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~X-Club", 3000, 1);
SetPlayerPos(playerid,1233.0610,-1423.3452,13.4564);
}*/
else if (PlayerToPoint(2, playerid,1286.1377,-1542.0034,13.5611))
{// ProLaps ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~ProLaps", 3000, 1);
SetPlayerPos(playerid,1284.8528,-1542.0132,13.5123);
}
else if (PlayerToPoint(2, playerid,1579.9427,-1424.5438,13.5469))
{// SkyBar ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~SkyBar caffe", 3000, 1);
SetPlayerPos(playerid,1482.6681,-1410.1644,38.7762);
}
else if (PlayerToPoint(2, playerid,1517.0608,-1582.5260,13.5469))
{// CoolBar ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~Cool Bar caffe", 3000, 1);
SetPlayerPos(playerid,1517.9265,-1574.0427,23.5469);
}
else if (PlayerToPoint(2, playerid,1286.7998,-1329.2324,13.5549))
{// Caffe Bar ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~Caffe Bar", 3000, 1);
SetPlayerPos(playerid,1290.4327,-1305.8646,18.8606);
}
// *****************************************************************************************
else if (PlayerToPoint(4, playerid,2073.2979,-1831.1228,13.5469))
{ // Pay & Spray kod PIZZA Sbizz 57
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[57][sbEntranceCost] + 100)
        {
            if(SBizzInfo[57][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2062.1294,-1831.5498,13.5469);
        SetVehicleZAngle(tmpcar, 90);
        GivePlayerMoney(playerid, - SBizzInfo[57][sbEntranceCost]);
        SBizzInfo[57][sbTill] += SBizzInfo[57][sbEntranceCost];
        SBizzInfo[57][sbProducts]--;
        SetTimerEx("AfterSpray1", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
else if (PlayerToPoint(4, playerid,1024.9756,-1030.7930,32.0257))
{ // Pay & Spray BURG Sbizz 55
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[55][sbEntranceCost] + 100)
        {
            if(SBizzInfo[55][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1024.9763,-1021.8850,32.1016);
        SetVehicleZAngle(tmpcar, 0);
        GivePlayerMoney(playerid, - SBizzInfo[55][sbEntranceCost]);
        SBizzInfo[55][sbTill] += SBizzInfo[55][sbEntranceCost];
        SBizzInfo[55][sbProducts]--;
        SetTimerEx("AfterSpray2", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
else if (PlayerToPoint(4, playerid,488.3819,-1733.0563,11.1752))
{ // Pay & Spray PLAZA Sbizz
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[56][sbEntranceCost] + 100)
        {
            if(SBizzInfo[56][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 487.4099,-1741.4585,11.1330);
        SetVehicleZAngle(tmpcar, 180);
        GivePlayerMoney(playerid, - SBizzInfo[56][sbEntranceCost]);
        SBizzInfo[56][sbTill] += SBizzInfo[56][sbEntranceCost];
        SBizzInfo[56][sbProducts]--;
        SetTimerEx("AfterSpray3", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
else if (PlayerToPoint(10, playerid,1620.9669,-2147.4441,13.5797))
{ // Pay & Spray AERODROM
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[60][sbEntranceCost] + 100)
        {
            if(SBizzInfo[60][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1616.6619,-2136.8508,13.6142);
        SetVehicleZAngle(tmpcar, 177.8316);
        GivePlayerMoney(playerid, - SBizzInfo[60][sbEntranceCost]);
        SBizzInfo[60][sbTill] += SBizzInfo[60][sbEntranceCost];
        SBizzInfo[60][sbProducts]--;
        SetTimerEx("AfterSpray5", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
else if (PlayerToPoint(4, playerid,719.8940,-464.8272,16.3359))
{ // Pay & Spray kod BIKERA Sbizz 5
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
        {
            if(SBizzInfo[5][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 720.3924,-456.0286,16.3359);
        SetVehicleZAngle(tmpcar, 0);
        GivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
        SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
        SBizzInfo[5][sbProducts]--;
        SetTimerEx("AfterSpray4", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
}
return 1;
}

if(strcmp(cmd, "/exit", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
for(new i = 0; i <  sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
    if(HouseEntered[playerid] == i)
    {
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,0);
HouseEntered[playerid] = 255;
TogglePlayerControllable(playerid, 1);
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
return 1;
}
}
}
for(new i = 0; i <  sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
PlayerInfo[playerid][pLocal] = 255;
TogglePlayerControllable(playerid, 1);
}
else if(PlayerToPoint(3,playerid,1189.790161,-912.604858,1.311782) || PlayerToPoint(3,playerid,793.063415,-1622.839111,-10.992186) || PlayerToPoint(3,playerid,932.051208,-1353.114013,-22.488183))
{
    OnPlayerExitFood(playerid);
    InAFoodPlace[playerid] = 0;
    TogglePlayerControllable(playerid, 1);
}
}
new carid = GetPlayerVehicleID(playerid);
if (IsABus(carid))
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, carid);
}
   if(IsAHarvest(carid))
{
    if (carid != 0)
{
SetVehicleToRespawn(carid);
TogglePlayerControllable(playerid, 1);
}
if(FarmerPickup[playerid][0] >= 1 && FarmerPickup[playerid][0] <= 22)
{
FarmerPickup[playerid][0]--;
}
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    FarmerVar[playerid] = 0;
    DisablePlayerCheckpoint(playerid);

}
if(IsAnOwnableCar(carid) && CarInfo[carid][cOwned] == 0)
    {
        RemovePlayerFromVehicle(playerid);
        TogglePlayerControllable(playerid, 1);
    }
    if(IsPlayerInAnyVehicle(playerid) && !engineOn[GetPlayerVehicleID(playerid)] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
{
    SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1481.0206,-1771.1138,18.7958);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if (PlayerToPoint(6.0, playerid,-1404.5299,-259.0602,1043.6563))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
}
else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
}
else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
}
else if(NoFuel[playerid] == 1)
{
    TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
NoFuel[playerid] = 0;
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Poslednja Izmena: Januar 23, 2017, 01:20:25 PRE PODNE od Tonyx


[pawn]
if((newkeys == KEY_SECONDARY_ATTACK))
   {
       if(IsPlayerConnected(playerid))
      {
         for(new i = 0; i <  sizeof(HouseInfo); i++)
         {
             if (PlayerToPoint(3, playerid,HouseInfo[hExitx], HouseInfo[hExity], HouseInfo[hExitz]) && PlayerInfo[playerid][pLocal] == i)
            {
               if(GetPlayerVirtualWorld(playerid) == HouseInfo[hWorld])
               {
                  SetTimerEx("IntFreeze", 3000, false, "i", playerid);
                  JBC_TogglePlayerControllable(playerid, 0);
                  SetPlayerInterior(playerid, 0);
                  JBC_SetPlayerPos(playerid,HouseInfo[hEntrancex],HouseInfo[hEntrancey],HouseInfo[hEntrancez]);
                  PlayerInfo[playerid][pInt] = 0;
                  PlayerInfo[playerid][pLocal] = 255;
                  SetPlayerVirtualWorld(playerid,0);
                   PlayerInfo[playerid][pVirWorld] = 0;
                  if(HouseInfo[hHel] == 1)
                  {
                     new Float:tempheal;
                     GetPlayerHealth(playerid,tempheal);
                     if(tempheal < 100.0)
                     {
                     JBC_SetPlayerHealth(playerid,100.0);
                     }
                  }
               }
            }
         }
         for(new i = 0; i <  sizeof(StanInfo); i++)
         {
             if (PlayerToPoint(3, playerid,StanInfo[sExitx], StanInfo[sExity], StanInfo[sExitz]) && PlayerInfo[playerid][pLocal] == i)
            {
               if(GetPlayerVirtualWorld(playerid) == StanInfo[sWorld])
               {
                        SetTimerEx("IntFreeze", 3000, false, "i", playerid);
                  JBC_TogglePlayerControllable(playerid, 0);
                  SetPlayerInterior(playerid,0);
                  JBC_SetPlayerPos(playerid,StanInfo[sEntrancex],StanInfo[sEntrancey],StanInfo[sEntrancez]);
                  PlayerInfo[playerid][pInt] = 0;
                  PlayerInfo[playerid][pLocal] = 255;
                  SetPlayerVirtualWorld(playerid,0);
                   PlayerInfo[playerid][pVirWorld] = 0;
                  if(StanInfo[sHel] == 1)
                  {
                     new Float:tempheal;
                     GetPlayerHealth(playerid,tempheal);
                     if(tempheal < 100.0)
                     {
                        JBC_SetPlayerHealth(playerid,100.0);
                        }
                  }
               }
            }
         }
         for(new i = 0; i <  sizeof(BizzInfo); i++)
         {
            //printf("Bizz :%d",i);
            if (PlayerToPoint(3, playerid,BizzInfo[bExitX], BizzInfo[bExitY], BizzInfo[bExitZ]))
            {
               SetPlayerInterior(playerid,0);
               PlayerInfo[playerid][pInt] = 0;
               SetPlayerVirtualWorld(playerid,0);
               PlayerInfo[playerid][pVirWorld] = 0;
               JBC_SetPlayerPos(playerid,BizzInfo[bEntranceX],BizzInfo[bEntranceY],BizzInfo[bEntranceZ]);
               PlayerInfo[playerid][pLocal] = 255;
             }
           }
           }
      }

   if((newkeys == KEY_SECONDARY_ATTACK))
   {
       if(IsPlayerConnected(playerid))
      {
            for(new i = 0; i < sizeof(HouseInfo); i++)
         {
            if (PlayerToPoint(3, playerid,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]))
            {
               if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[hLock] == 0)
               {
                  SetPlayerInterior(playerid,HouseInfo[hInt]);
                  JBC_SetPlayerPos(playerid,HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz]);
                  GameTextForPlayer(playerid, "~w~Dobrodosli kuci", 5000, 1);
                  SetPlayerVirtualWorld(playerid,HouseInfo[hWorld]);
                  PlayerInfo[playerid][pInt] = HouseInfo[hInt];
                  PlayerInfo[playerid][pLocal] = i;
               }
               else
               {
                  GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
               }
            }
         }
         for(new i = 0; i < sizeof(StanInfo); i++)
         {
            if (PlayerToPoint(3, playerid,StanInfo[sEntrancex], StanInfo[sEntrancey], StanInfo[sEntrancez]))
            {
               if(PlayerInfo[playerid][pPstankey] == i || StanInfo[sLock] == 0)
               {
                  SetPlayerInterior(playerid,StanInfo[sInt]);
                  JBC_SetPlayerPos(playerid,StanInfo[sExitx],StanInfo[sExity],StanInfo[sExitz]);
                  GameTextForPlayer(playerid, "~w~Dobrodosli kuci", 5000, 1);
                  SetPlayerVirtualWorld(playerid,StanInfo[sWorld]);
                  PlayerInfo[playerid][pInt] = StanInfo[sInt];
                  PlayerInfo[playerid][pLocal] = i;
               }
               else
               {
                  GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
               }
            }
         }
         for(new i = 0; i < sizeof(BizzInfo); i++)
         {
            if (PlayerToPoint(3, playerid,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]))
            {
               //printf("Found House :%d",i);
               if(!IsACop(playerid) && i == 3)
               {
                   SendClientMessage(playerid, COLOR_GREY, "   Policajci samo !");
                   return 1;
               }
               if(PlayerInfo[playerid][pPbiskey] == i || JBC_GetPlayerMoney(playerid) >= BizzInfo[bEntranceCost])
               {
                  if(PlayerInfo[playerid][pPbiskey] != i)
                  {
                     if(BizzInfo[bLocked] == 1)
                     {
                        GameTextForPlayer(playerid, "~r~Zatvoreno", 5000, 1);
                        return 1;
                     }
                     if(BizzInfo[bProducts] == 0)
                     {
                        GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
                        return 1;
                     }
[/pawn]
To ti je primer.

[quote author=[OE] Tosic ãƒ,, link=topic=108525.msg694973#msg694973 date=1485245712]
[pawn]
if((newkeys == KEY_SECONDARY_ATTACK))
   {
       if(IsPlayerConnected(playerid))
      {
         for(new i = 0; i <  sizeof(HouseInfo); i++)
         {
             if (PlayerToPoint(3, playerid,HouseInfo[hExitx], HouseInfo[hExity], HouseInfo[hExitz]) && PlayerInfo[playerid][pLocal] == i)
            {
               if(GetPlayerVirtualWorld(playerid) == HouseInfo[hWorld])
               {
                  SetTimerEx("IntFreeze", 3000, false, "i", playerid);
                  JBC_TogglePlayerControllable(playerid, 0);
                  SetPlayerInterior(playerid, 0);
                  JBC_SetPlayerPos(playerid,HouseInfo[hEntrancex],HouseInfo[hEntrancey],HouseInfo[hEntrancez]);
                  PlayerInfo[playerid][pInt] = 0;
                  PlayerInfo[playerid][pLocal] = 255;
                  SetPlayerVirtualWorld(playerid,0);
                   PlayerInfo[playerid][pVirWorld] = 0;
                  if(HouseInfo[hHel] == 1)
                  {
                     new Float:tempheal;
                     GetPlayerHealth(playerid,tempheal);
                     if(tempheal < 100.0)
                     {
                     JBC_SetPlayerHealth(playerid,100.0);
                     }
                  }
               }
            }
         }
         for(new i = 0; i <  sizeof(StanInfo); i++)
         {
             if (PlayerToPoint(3, playerid,StanInfo[sExitx], StanInfo[sExity], StanInfo[sExitz]) && PlayerInfo[playerid][pLocal] == i)
            {
               if(GetPlayerVirtualWorld(playerid) == StanInfo[sWorld])
               {
                        SetTimerEx("IntFreeze", 3000, false, "i", playerid);
                  JBC_TogglePlayerControllable(playerid, 0);
                  SetPlayerInterior(playerid,0);
                  JBC_SetPlayerPos(playerid,StanInfo[sEntrancex],StanInfo[sEntrancey],StanInfo[sEntrancez]);
                  PlayerInfo[playerid][pInt] = 0;
                  PlayerInfo[playerid][pLocal] = 255;
                  SetPlayerVirtualWorld(playerid,0);
                   PlayerInfo[playerid][pVirWorld] = 0;
                  if(StanInfo[sHel] == 1)
                  {
                     new Float:tempheal;
                     GetPlayerHealth(playerid,tempheal);
                     if(tempheal < 100.0)
                     {
                        JBC_SetPlayerHealth(playerid,100.0);
                        }
                  }
               }
            }
         }
         for(new i = 0; i <  sizeof(BizzInfo); i++)
         {
            //printf("Bizz :%d",i);
            if (PlayerToPoint(3, playerid,BizzInfo[bExitX], BizzInfo[bExitY], BizzInfo[bExitZ]))
            {
               SetPlayerInterior(playerid,0);
               PlayerInfo[playerid][pInt] = 0;
               SetPlayerVirtualWorld(playerid,0);
               PlayerInfo[playerid][pVirWorld] = 0;
               JBC_SetPlayerPos(playerid,BizzInfo[bEntranceX],BizzInfo[bEntranceY],BizzInfo[bEntranceZ]);
               PlayerInfo[playerid][pLocal] = 255;
             }
           }
           }
      }

   if((newkeys == KEY_SECONDARY_ATTACK))
   {
       if(IsPlayerConnected(playerid))
      {
            for(new i = 0; i < sizeof(HouseInfo); i++)
         {
            if (PlayerToPoint(3, playerid,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]))
            {
               if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[hLock] == 0)
               {
                  SetPlayerInterior(playerid,HouseInfo[hInt]);
                  JBC_SetPlayerPos(playerid,HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz]);
                  GameTextForPlayer(playerid, "~w~Dobrodosli kuci", 5000, 1);
                  SetPlayerVirtualWorld(playerid,HouseInfo[hWorld]);
                  PlayerInfo[playerid][pInt] = HouseInfo[hInt];
                  PlayerInfo[playerid][pLocal] = i;
               }
               else
               {
                  GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
               }
            }
         }
         for(new i = 0; i < sizeof(StanInfo); i++)
         {
            if (PlayerToPoint(3, playerid,StanInfo[sEntrancex], StanInfo[sEntrancey], StanInfo[sEntrancez]))
            {
               if(PlayerInfo[playerid][pPstankey] == i || StanInfo[sLock] == 0)
               {
                  SetPlayerInterior(playerid,StanInfo[sInt]);
                  JBC_SetPlayerPos(playerid,StanInfo[sExitx],StanInfo[sExity],StanInfo[sExitz]);
                  GameTextForPlayer(playerid, "~w~Dobrodosli kuci", 5000, 1);
                  SetPlayerVirtualWorld(playerid,StanInfo[sWorld]);
                  PlayerInfo[playerid][pInt] = StanInfo[sInt];
                  PlayerInfo[playerid][pLocal] = i;
               }
               else
               {
                  GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
               }
            }
         }
         for(new i = 0; i < sizeof(BizzInfo); i++)
         {
            if (PlayerToPoint(3, playerid,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]))
            {
               //printf("Found House :%d",i);
               if(!IsACop(playerid) && i == 3)
               {
                   SendClientMessage(playerid, COLOR_GREY, "   Policajci samo !");
                   return 1;
               }
               if(PlayerInfo[playerid][pPbiskey] == i || JBC_GetPlayerMoney(playerid) >= BizzInfo[bEntranceCost])
               {
                  if(PlayerInfo[playerid][pPbiskey] != i)
                  {
                     if(BizzInfo[bLocked] == 1)
                     {
                        GameTextForPlayer(playerid, "~r~Zatvoreno", 5000, 1);
                        return 1;
                     }
                     if(BizzInfo[bProducts] == 0)
                     {
                        GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
                        return 1;
                     }
[/pawn]
To ti je primer.
[/quote]
Pokusao ponovo ulaz radi ali exit ne radi:
if((newkeys == KEY_SECONDARY_ATTACK))
{
    if(IsPlayerConnected(playerid))
{
for(new i = 0; i <  sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
    if(HouseEntered[playerid] == i)
    {
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,0);
HouseEntered[playerid] = 255;
TogglePlayerControllable(playerid, 1);
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
return 1;
}
}
}
for(new i = 0; i <  sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
PlayerInfo[playerid][pLocal] = 255;
TogglePlayerControllable(playerid, 1);
}
else if(PlayerToPoint(3,playerid,1189.790161,-912.604858,1.311782) || PlayerToPoint(3,playerid,793.063415,-1622.839111,-10.992186) || PlayerToPoint(3,playerid,932.051208,-1353.114013,-22.488183))
{
    OnPlayerExitFood(playerid);
    InAFoodPlace[playerid] = 0;
    TogglePlayerControllable(playerid, 1);
}
}
new carid = GetPlayerVehicleID(playerid);
if (IsABus(carid))
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, carid);
}
            if(IsAHarvest(carid))
{
    if (carid != 0)
{
SetVehicleToRespawn(carid);
TogglePlayerControllable(playerid, 1);
}
if(FarmerPickup[playerid][0] >= 1 && FarmerPickup[playerid][0] <= 22)
{
FarmerPickup[playerid][0]--;
}
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    FarmerVar[playerid] = 0;
    DisablePlayerCheckpoint(playerid);

}
if(IsAnOwnableCar(carid) && CarInfo[carid][cOwned] == 0)
    {
        RemovePlayerFromVehicle(playerid);
        TogglePlayerControllable(playerid, 1);
    }
    if(IsPlayerInAnyVehicle(playerid) && !engineOn[GetPlayerVehicleID(playerid)] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
{
    SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1481.0206,-1771.1138,18.7958);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if (PlayerToPoint(6.0, playerid,-1404.5299,-259.0602,1043.6563))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
}
else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
}
else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
}
else if(NoFuel[playerid] == 1)
{
    TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
NoFuel[playerid] = 0;
}
}
return 1;
}


Pa objasnio ti Tosic. I ne bih ti preporucio taj GM za edit.
samo rejv i debele zene

Citat: Andrijevicâ,,¢ poslato Januar 26, 2017, 01:42:48 PRE PODNE
Pa objasnio ti Tosic. I ne bih ti preporucio taj GM za edit.
Pa da postavio mi cmd i to sam i uradio u svom modu ali mi ne radi izlaz.


[quote author=[OE] Tosic ãƒ,, link=topic=108525.msg695531#msg695531 date=1485517420]
Pa isto za izlaz....
[/quote]
Vec sam pisao gore,isto sam i uradio i dao cmd kako sam stavio u pwn ali mi ne radi u tome je problem.Znaci ulaz radi ali izlaz ne radi a isto sam uradio i za ulaz i za izlaz.
Evo to za izlaz:
if((newkeys == KEY_SECONDARY_ATTACK))
{
    if(IsPlayerConnected(playerid))
{
for(new i = 0; i <  sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
    if(HouseEntered[playerid] == i)
    {
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,0);
HouseEntered[playerid] = 255;
TogglePlayerControllable(playerid, 1);
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
return 1;
}
}
}
for(new i = 0; i <  sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
PlayerInfo[playerid][pLocal] = 255;
TogglePlayerControllable(playerid, 1);
}
else if(PlayerToPoint(3,playerid,1189.790161,-912.604858,1.311782) || PlayerToPoint(3,playerid,793.063415,-1622.839111,-10.992186) || PlayerToPoint(3,playerid,932.051208,-1353.114013,-22.488183))
{
    OnPlayerExitFood(playerid);
    InAFoodPlace[playerid] = 0;
    TogglePlayerControllable(playerid, 1);
}
}
new carid = GetPlayerVehicleID(playerid);
if (IsABus(carid))
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, carid);
}
            if(IsAHarvest(carid))
{
    if (carid != 0)
{
SetVehicleToRespawn(carid);
TogglePlayerControllable(playerid, 1);
}
if(FarmerPickup[playerid][0] >= 1 && FarmerPickup[playerid][0] <= 22)
{
FarmerPickup[playerid][0]--;
}
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    FarmerVar[playerid] = 0;
    DisablePlayerCheckpoint(playerid);

}
if(IsAnOwnableCar(carid) && CarInfo[carid][cOwned] == 0)
    {
        RemovePlayerFromVehicle(playerid);
        TogglePlayerControllable(playerid, 1);
    }
    if(IsPlayerInAnyVehicle(playerid) && !engineOn[GetPlayerVehicleID(playerid)] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
{
    SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1481.0206,-1771.1138,18.7958);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if (PlayerToPoint(6.0, playerid,-1404.5299,-259.0602,1043.6563))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
}
else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
}
else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
}
else if(NoFuel[playerid] == 1)
{
    TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
NoFuel[playerid] = 0;
}
}
return 1;
}
Poslednja Izmena: Januar 27, 2017, 21:23:56 POSLE PODNE od Tonyx

Citat: Tonyx poslato Januar 23, 2017, 01:19:05 PRE PODNE
Skripta koju koristim: BE x8.5
Detaljan opis problema:Kako da napravim da umjesto komandi /enter i /exit bude ulaz na "F".Pokusao sam da zamijenim if(strcmp(cmd, "/enter", true) == 0) sa if( newkeys == KEY_SECONDARY_ATTACK ) Ovo sam stavio pod public OnPlayerKeyStateChange.  Znaci ulaz radi .Isto sam uradio i sa komandom /exit ali izlaz ne radi, kad stisnem F nista se ne desava.
Dio skripte:Evo komande:
if(strcmp(cmd, "/enter", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
if(WantedLevel[playerid] > 0)
                {
                SendClientMessage(playerid, COLOR_GREY, "Imate Wanted ne mozete koristiti to!");
            return 1;
            }
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~g~Dobrodosli kuci", 4000, 4);
HouseInfo[i][hTimer] = 0;
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
HouseEntered[playerid] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Kuca ~w~Zakljucana", 4000, 4);
}
}
}
// *****************************************************************************
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
if(WantedLevel[playerid] > 0)
                {
                SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Imate Wanted ne mozete koristiti to!");
            return 1;
            }
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~w~Firma ~r~zatvorena", 4000, 4);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 4);
return 1;
}
if (PlayerToPoint(3.0, playerid,1199.323974,-918.954528,43.116638))
{
OnPlayerEnterFood(playerid, 5);
}
else if (PlayerToPoint(3.0, playerid,811.321411,-1616.181030,13.546875))
{
OnPlayerEnterFood(playerid, 6);
}
else if (PlayerToPoint(3.0, playerid,927.906250,-1352.942626,13.343750))
{
OnPlayerEnterFood(playerid, 7);
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-$%d~n~~w~kucajte /exit~n~da izadjete", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s je platio $%d da bi usao u firmu %d", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
}
else
{
GameTextForPlayer(playerid, "~r~Nemate dovoljno novca", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,1100.8438)) // novi ammu privatni
{
    GameTextForPlayer(playerid, "~w~Dobrodosli u Prodavnicu oruzja", 3000, 1);
    SetPlayerInterior(playerid,7);
    PlayerInfo[playerid][pInt] = 7;
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
    GameTextForPlayer(playerid, "~w~Dobrodosli u 8ball Track", 5000, 1);
    SetPlayerInterior(playerid,7);
    PlayerInfo[playerid][pInt] = 7;
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
    GameTextForPlayer(playerid, "~w~Dobrodosli na Dirt Track", 5000, 1);
    SetPlayerInterior(playerid,4);
    PlayerInfo[playerid][pInt] = 4;
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
    GameTextForPlayer(playerid, "~w~Dobrodosli na Stunting Track", 5000, 1);
    SetPlayerInterior(playerid,14);
    PlayerInfo[playerid][pInt] = 14;
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
else if (PlayerToPoint(2, playerid,1423.5,-1180.3,26))
{// Gradjevinska firma
    GameTextForPlayer(playerid, "~w~Dobrodosli u Gradjevinsku firmu", 5000, 1);
    SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,447.52,280.4,1027.6);
    PlayerInfo[playerid][pInt] = 0;
TogglePlayerControllable(playerid, 0);
SetTimerEx("UlazuInt",3000, false, "i", playerid);
}
else if (PlayerToPoint(2, playerid,1564,-1330.7,16.45))
{// Skakanje padobranom
if (PadobranZeton[playerid] == 1)
{
    GameTextForPlayer(playerid, "~w~Skakanje padobranom", 3000, 1);
SetPlayerPos(playerid,1548.8,-1363.8,326.22);
GivePlayerWeapon(playerid, 46, 1);
    PadobranZeton[playerid] = 0;
    }
    else
    {
SendClientMessage(playerid, COLOR_GRAD1, "[GRESKA] Nemate zeton !");
}
}
else if (PlayerToPoint(2, playerid,1104.9,-1369.7,13.98))
{// METRO
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~METRO", 3000, 1);
    SetPlayerInterior(playerid,10);
    SetPlayerFacingAngle(playerid, 178.5894);
SetPlayerPos(playerid, 484.96,-2378.81,1121);
    PlayerInfo[playerid][pInt] = 10;
TogglePlayerControllable(playerid, 0);
SetTimerEx("UlazuInt",3000, false, "i", playerid);
}
// *****************************************************************************************
// KAFICI ulaz u kafice

else if (PlayerToPoint(2, playerid,1327.0173,-1547.7502,13.5469))
{// Corner ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~Corner caffe", 3000, 1);
SetPlayerPos(playerid,1326.8635,-1549.0336,13.5469);
}
/*else if (PlayerToPoint(2, playerid,1234.1210,-1423.2371,13.4620))
{// X Club ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~X-Club", 3000, 1);
SetPlayerPos(playerid,1233.0610,-1423.3452,13.4564);
}*/
else if (PlayerToPoint(2, playerid,1286.1377,-1542.0034,13.5611))
{// ProLaps ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~ProLaps", 3000, 1);
SetPlayerPos(playerid,1284.8528,-1542.0132,13.5123);
}
else if (PlayerToPoint(2, playerid,1579.9427,-1424.5438,13.5469))
{// SkyBar ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~SkyBar caffe", 3000, 1);
SetPlayerPos(playerid,1482.6681,-1410.1644,38.7762);
}
else if (PlayerToPoint(2, playerid,1517.0608,-1582.5260,13.5469))
{// CoolBar ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~Cool Bar caffe", 3000, 1);
SetPlayerPos(playerid,1517.9265,-1574.0427,23.5469);
}
else if (PlayerToPoint(2, playerid,1286.7998,-1329.2324,13.5549))
{// Caffe Bar ULAZ
    GameTextForPlayer(playerid, "~w~Dobrodosli u ~r~Caffe Bar", 3000, 1);
SetPlayerPos(playerid,1290.4327,-1305.8646,18.8606);
}
// *****************************************************************************************
else if (PlayerToPoint(4, playerid,2073.2979,-1831.1228,13.5469))
{ // Pay & Spray kod PIZZA Sbizz 57
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[57][sbEntranceCost] + 100)
        {
            if(SBizzInfo[57][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2062.1294,-1831.5498,13.5469);
        SetVehicleZAngle(tmpcar, 90);
        GivePlayerMoney(playerid, - SBizzInfo[57][sbEntranceCost]);
        SBizzInfo[57][sbTill] += SBizzInfo[57][sbEntranceCost];
        SBizzInfo[57][sbProducts]--;
        SetTimerEx("AfterSpray1", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
else if (PlayerToPoint(4, playerid,1024.9756,-1030.7930,32.0257))
{ // Pay & Spray BURG Sbizz 55
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[55][sbEntranceCost] + 100)
        {
            if(SBizzInfo[55][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1024.9763,-1021.8850,32.1016);
        SetVehicleZAngle(tmpcar, 0);
        GivePlayerMoney(playerid, - SBizzInfo[55][sbEntranceCost]);
        SBizzInfo[55][sbTill] += SBizzInfo[55][sbEntranceCost];
        SBizzInfo[55][sbProducts]--;
        SetTimerEx("AfterSpray2", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
else if (PlayerToPoint(4, playerid,488.3819,-1733.0563,11.1752))
{ // Pay & Spray PLAZA Sbizz
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[56][sbEntranceCost] + 100)
        {
            if(SBizzInfo[56][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 487.4099,-1741.4585,11.1330);
        SetVehicleZAngle(tmpcar, 180);
        GivePlayerMoney(playerid, - SBizzInfo[56][sbEntranceCost]);
        SBizzInfo[56][sbTill] += SBizzInfo[56][sbEntranceCost];
        SBizzInfo[56][sbProducts]--;
        SetTimerEx("AfterSpray3", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
else if (PlayerToPoint(10, playerid,1620.9669,-2147.4441,13.5797))
{ // Pay & Spray AERODROM
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[60][sbEntranceCost] + 100)
        {
            if(SBizzInfo[60][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1616.6619,-2136.8508,13.6142);
        SetVehicleZAngle(tmpcar, 177.8316);
        GivePlayerMoney(playerid, - SBizzInfo[60][sbEntranceCost]);
        SBizzInfo[60][sbTill] += SBizzInfo[60][sbEntranceCost];
        SBizzInfo[60][sbProducts]--;
        SetTimerEx("AfterSpray5", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
else if (PlayerToPoint(4, playerid,719.8940,-464.8272,16.3359))
{ // Pay & Spray kod BIKERA Sbizz 5
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
        {
            if(SBizzInfo[5][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 720.3924,-456.0286,16.3359);
        SetVehicleZAngle(tmpcar, 0);
        GivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
        SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
        SBizzInfo[5][sbProducts]--;
        SetTimerEx("AfterSpray4", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
    }
}
}
return 1;
}

if(strcmp(cmd, "/exit", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
for(new i = 0; i <  sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
    if(HouseEntered[playerid] == i)
    {
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,0);
HouseEntered[playerid] = 255;
TogglePlayerControllable(playerid, 1);
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
return 1;
}
}
}
for(new i = 0; i <  sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
PlayerInfo[playerid][pLocal] = 255;
TogglePlayerControllable(playerid, 1);
}
else if(PlayerToPoint(3,playerid,1189.790161,-912.604858,1.311782) || PlayerToPoint(3,playerid,793.063415,-1622.839111,-10.992186) || PlayerToPoint(3,playerid,932.051208,-1353.114013,-22.488183))
{
    OnPlayerExitFood(playerid);
    InAFoodPlace[playerid] = 0;
    TogglePlayerControllable(playerid, 1);
}
}
new carid = GetPlayerVehicleID(playerid);
if (IsABus(carid))
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, carid);
}
   if(IsAHarvest(carid))
{
    if (carid != 0)
{
SetVehicleToRespawn(carid);
TogglePlayerControllable(playerid, 1);
}
if(FarmerPickup[playerid][0] >= 1 && FarmerPickup[playerid][0] <= 22)
{
FarmerPickup[playerid][0]--;
}
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    FarmerVar[playerid] = 0;
    DisablePlayerCheckpoint(playerid);

}
if(IsAnOwnableCar(carid) && CarInfo[carid][cOwned] == 0)
    {
        RemovePlayerFromVehicle(playerid);
        TogglePlayerControllable(playerid, 1);
    }
    if(IsPlayerInAnyVehicle(playerid) && !engineOn[GetPlayerVehicleID(playerid)] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
}
else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
{
    SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1481.0206,-1771.1138,18.7958);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if (PlayerToPoint(6.0, playerid,-1404.5299,-259.0602,1043.6563))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
}
else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
}
else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313))
{
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
}
else if(NoFuel[playerid] == 1)
{
    TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
NoFuel[playerid] = 0;
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno)://