Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: ᴢᴢᴇʀᴏ.ᴘᴡɴ poslato Jun 09, 2020, 20:01:14 POSLE PODNE

Naslov: Pomoc ?
Poruka od: ᴢᴢᴇʀᴏ.ᴘᴡɴ poslato Jun 09, 2020, 20:01:14 POSLE PODNE
Problem(error/warning): Kad udjem u kola pojavi se banka td kad izadjem nestane
Pawno Code: [Odaberi] nez do cega je
Dio skripte: //
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): //
Slika/video ingame problema(obavezno ako je ingame problem):  https://imgur.com/a/W1EMfLF

neko help ?  :o

stavio sam [pawn]      Banka[playerid] = CreatePlayerTextDraw(playerid,432.932617, 431.089141, "bank: 012345678~g~$");
   PlayerTextDrawLetterSize(playerid,Banka[playerid], 0.121333, 0.542222);
   PlayerTextDrawAlignment(playerid,Banka[playerid], 1);
   PlayerTextDrawColor(playerid,Banka[playerid], -1);
   PlayerTextDrawSetShadow(playerid,Banka[playerid], 0);
   PlayerTextDrawBackgroundColor(playerid,Banka[playerid], 255);
   PlayerTextDrawFont(playerid,Banka[playerid], 2);
   PlayerTextDrawSetProportional(playerid,Banka[playerid], 1);[/pawn]
[pawn]      PlayerTextDrawShow(playerid, Banka[playerid]);[/pawn]
A gledo sam i za zlato sve je isto ko za banku al opet nece
Naslov: Odg: Pomoc ?
Poruka od: __vedran.xyz77 poslato Jun 09, 2020, 20:05:33 POSLE PODNE
pa trazi banka po modu i tjt
Naslov: Odg: Pomoc ?
Poruka od: ᴢᴢᴇʀᴏ.ᴘᴡɴ poslato Jun 09, 2020, 20:25:04 POSLE PODNE
i ? bas si mi puno pomogo
Naslov: Odg: Pomoc ?
Poruka od: pokerface poslato Jun 09, 2020, 20:28:50 POSLE PODNE
Pa gledaj po OnPlayerEnterVehicle, OnPlayerExitVehicle, OnPlayerStateChange
Naslov: Odg: Pomoc ?
Poruka od: Shadow. poslato Jun 09, 2020, 20:29:11 POSLE PODNE
CitatKad udjem u kola pojavi se banka td kad izadjem nestane
udjem u kola

https://wiki.sa-mp.com/wiki/OnPlayerEnterVehicle

:-X :-X ??? ???
Naslov: Odg: Pomoc ?
Poruka od: ᴢᴢᴇʀᴏ.ᴘᴡɴ poslato Jun 09, 2020, 20:33:39 POSLE PODNE
Citat: Hydra. poslato Jun 09, 2020, 20:28:50 POSLE PODNE
Pa gledaj po OnPlayerEnterVehicle, OnPlayerExitVehicle, OnPlayerStateChange

[pawn]public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new sendername[MAX_PLAYER_NAME];
    new stringsfg[64];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(stringsfg, sizeof(stringsfg), " %s ulazi u vozilo.", sendername);
    ProxDetector(30.0, playerid, stringsfg, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:Poz[3]; GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
   SCM(playerid,-1,""ZELENA"[INFO] "BELA"Ulazite u vozilo! TEMPOMAT - Y !");
   SCM(playerid,-1,""ZELENA"[INFO] "BELA"Paljenje/Gasenje Svetla - /svetlaon /svetlaoff!");
   for(new i = 0; i < MAX_AUTA; i++)
   {
      if(VoziloInfo[vID] == vehicleid)
      {
         if(VoziloInfo[vImaVlasnika] == 1)
         {
            if(PlayerInfo[playerid][pAdmin] >= 5)
            {
               new string[128];
               format(string,sizeof(string), ""PPLAVA"Privatno Auto | "SIVA"Vlasnik: "PPLAVA"%s | "ZELENA"ID: %i", VoziloInfo[vVlasnik], i);
               SCM(playerid,-1,string);
            }
            else if(PlayerInfo[playerid][pPosedovanjeAuta] == i || PlayerInfo[playerid][pPosedovanjeAuta2] == i)
            {
               SCM(playerid,-1,"[IG:RPG] "ZELENA"Ulazite u vase vozilo!");
            }
            else if(VoziloInfo[vZakljucan] == 0)
            {
               SCM(playerid,-1,""PPLAVA"Privatno Vozilo");
            }
            else
            {
               SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
               SCM(playerid,-1,""BELA"Vozilo "CRVENA"Zakljucano");
            }
         }

         return 1;
      }
   }
   for(new i = 0; i < MAX_MOTORA; i++)
   {
      if(MotorInfo[mID] == vehicleid)
      {
         if(MotorInfo[mImaVlasnika] == 1)
         {
            if(PlayerInfo[playerid][pAdmin] >= 5)
            {
               new string[128];
               format(string,sizeof(string), ""PPLAVA"Privatni Motor | "SIVA"Vlasnik: "PPLAVA"%s | "ZELENA"ID: %i", MotorInfo[mVlasnik], i);
               SCM(playerid,-1,string);
            }
            else if(PlayerInfo[playerid][pPosedovanjeMotora] == i)
            {
               SCM(playerid,-1,"[IG:RPG] "ZELENA"Sedate na vas motor!");
            }
            else if(MotorInfo[mZakljucan] == 0)
            {
               SCM(playerid,-1,""ZUTA"Privatni Motor");
            }
            else
            {
               SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
               SCM(playerid,-1,""BELA"Motor "CRVENA"Zakljucan");
            }
         }
         return 1;
      }
   }
   for(new i = 0; i < MAX_AVIONA; i++)
   {
      if(AvionInfo[avID] == vehicleid)
      {
         if(AvionInfo[avImaVlasnika] == 1)
         {
            if(PlayerInfo[playerid][pAdmin] >= 5)
            {
               new string[128];
               format(string,sizeof(string), ""PPLAVA"Privatna Letelica | "SIVA"Vlasnik: "PPLAVA"%s | "ZELENA"ID: %i", AvionInfo[avVlasnik], i);
               SCM(playerid,-1,string);
            }
            else if(PlayerInfo[playerid][pPosedovanjeAviona] == i)
            {
               SCM(playerid,-1,"[IG:RPG] "ZELENA"Ulazite u vasu letelicu!");
            }
            else if(AvionInfo[avZakljucan] == 0)
            {
               SCM(playerid,-1,""CRVENA"Privatna Letelica");
            }
            else
            {
               SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
               SCM(playerid,-1,""CRVENA"Letelica Zakljucana");
            }
         }
         return 1;
      }
   }
   for(new i; i < MAX_PLOVILA; i++)
   {
      if(PlovilaInfo[plID] == vehicleid)
      {
         if(PlovilaInfo[plImaVlasnika] == 1)
         {
            if(PlayerInfo[playerid][pAdmin] >= 5)
            {
               new string[128];
               format(string,sizeof(string), ""PPLAVA"Privatno Plovilo | "SIVA"Vlasnik: "PPLAVA"%s | "ZELENA"ID: %i", PlovilaInfo[plVlasnik], i);
               SCM(playerid,-1,string);
            }
            else if(PlayerInfo[playerid][pPosedovanjePlovila] == i)
            {
               SCM(playerid,-1,"[IG:RPG] "ZELENA"Sedate u vase plovilo!");
            }
            else if(PlovilaInfo[plZakljucan] == 0)
            {
               SCM(playerid,-1,""PPLAVA"Privatno Plovilo");
            }
            else
            {
               SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
               SCM(playerid,-1,""PPLAVA"Plovilo Zakljucano");
            }
         }

         return 1;
      }
   }
   if(vehicleid >= vmotosalon[0] && vehicleid <= vmotosalon[6])
   {
      SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
      SCM(playerid,-1,""PPLAVA"["BELA"IG:RPG"PPLAVA"] :Ne mozete uci u izlozbeno vozilo!");
   }
   if(vehicleid == IzlozbenoAuto)
   {
      SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
      SCM(playerid,-1,""PPLAVA"["BELA"IG:RPG"PPLAVA"] :Ne mozete uci u izlozbeno vozilo!");
   }
/*   if(AutoSalonVozila(vehicleid))
   {
      SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
      SCM(playerid,-1,""PPLAVA"["BELA"IG:RPG"PPLAVA"] :Ne mozete uci u izlozbeno vozilo!");
   }
*/   if(BikeSalonVozila(vehicleid))
   {
      SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
      SCM(playerid,-1,""PPLAVA"["BELA"IG:RPG"PPLAVA"] :Ne mozete uci u izlozbeno vozilo!");
   }
   if(!ispassenger)
   {
      if(PolicijskaAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 1)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~b~Los Santos Police Department!", 2500, 5);
         }
      }
      if(PoAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 11)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~Blue Lagoon", 2500, 5);
         }
      }
      if(PoAuta3(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 19)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~DR", 2500, 5);
         }
      }
      if(Po2Auta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 12)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~Blue Terra", 2500, 5);
         }
      }
      if(Po3Auta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 13)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~Da Naga Boys", 2500, 5);
         }
      }
      if(SaAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 10)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~Hitman", 2500, 5);
         }
      }
      if(TaxiAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 14)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~Taxi", 2500, 5);
         }
      }
      if(BaseAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 15)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~Yakuza", 2500, 5);
         }
      }
      if(FBIAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 7)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~FBI", 2500, 5);
         }
      }
      if(Brod(vehicleid))
      {
         if(PlayerInfo[playerid][pAdmin] < 0)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~Samo Admin", 2500, 5);
         }
      }
      if(FBIAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 7)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~b~FBI!", 2500, 5);
         }
      }
      if(ParkingAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 8)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~b~Parking Servis!", 2500, 5);
         }
      }
      if(CondorAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 9)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~Condor", 2500, 5);
         }
      }
      else if(TVFAuta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 2)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~The Vinci Family!", 2500, 5);
         }
      }
      else if(TBTVozila(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 3)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~l~Black Dragon Triads!", 2500, 5);
         }
      }
      else if(GroveVozila(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 4)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~g~Grove Street Family!", 2500, 5);
         }
      }
      else if(BallasVozila(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 5)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~w~Ballas!", 2500, 5);
         }
      }
      else if(NovinariVozila(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 6)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~y~Los Santos Novinari!", 2500, 5);
         }
      }
      if(Po4Auta(vehicleid))
      {
         if(PlayerInfo[playerid][pClan] != 20)
         {
            SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
            GameTextForPlayer(playerid, "~r~Russian Mafia", 2500, 5);
         }
      }
   }
   return 1;
}[/pawn]
Naslov: Odg: Pomoc ?
Poruka od: __vedran.xyz77 poslato Jun 10, 2020, 09:59:26 PRE PODNE
Citat: Kao neki Skripter poslato Jun 09, 2020, 20:25:04 POSLE PODNE
i ? bas si mi puno pomogo


Pa jedino da ti napišem liniju na kojoj je problem, i nije onplayerentervehicle nego https://wiki.sa-mp.com/wiki/OnPlayerStateChange
Naslov: Odg: Pomoc ?
Poruka od: Smith.amx poslato Jun 10, 2020, 12:11:26 POSLE PODNE
[pawn]if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
   {
   PlayerTextDrawHide(playerid, Banka[playerid]);
   }
  if(newstate == PLAYER_STATE_PASSENGER)
   {
PlayerTextDrawHide(playerid, Banka[playerid]);
   }[/pawn]
Pod onplayerstatechange probaj ovako.
Naslov: Odg: Pomoc ?
Poruka od: ᴢᴢᴇʀᴏ.ᴘᴡɴ poslato Jun 10, 2020, 16:44:17 POSLE PODNE
Resio sam :)

dodo sam samo [pawn]   if(newstate == PLAYER_STATE_ONFOOT)
   {
         PlayerTextDrawShow(playerid, Banka[playerid]);
   }[/pawn]