Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: BlackJoe poslato Novembar 09, 2014, 10:16:51 PRE PODNE

Naslov: [Pomoc] Rent
Poruka od: BlackJoe poslato Novembar 09, 2014, 10:16:51 PRE PODNE
Skripta koju koristim:City Lights [UP]
Detaljan opis problema:Mod je tu objavljen ali odmah na početku sam naišao na bug, kad rentam vozilo piše da je iznajmljeno ali ne mogu ga pokrenuti ni ništa. ne renta se pomoću komande nego klikom na texttdraw. Kao da se ne ugasi do kraja kad kliknem rentaj. strelica ostane i nemogu pokrenut motor vozila ni ništa..
Dio skripte:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == rent7[playerid])
{
if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"CL | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1, ""SIVA"Morate biti u vozilu!");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SCM(playerid,-1, ""SIVA"Morate biti na mestu vozaca!");
if(Rentano[playerid] != 299) { SCM(playerid,-1,""SIVA"Vec imas rentano vozilo!"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; }
  foreach(Player, i)
{
  if(Rentano[i] == GetPlayerVehicleID(playerid))
  {
SCM(playerid,-1, ""ZELENA"[RENT]: "SIVA"To vozilo je vec rentano!");
RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1);
return 1;
}
  }
if(BiciklaRent(GetPlayerVehicleID(playerid)))
{
if(PlayerInfo[playerid][pNovacDzep] < 30) { SCM(playerid,-1,""SIVA"Nemate dovoljno novca "ZELENA"(30$)"SIVA"!"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; }
SCM(playerid,-1,""SPLAVA"[INFO]: "BELA"Rentali ste biciklo za "ZELENA"30$.");
g_NovacMinus(playerid,30);
FirmaNovac(93, 30);
}
if(MotoRent(GetPlayerVehicleID(playerid)))
{
if(PlayerInfo[playerid][pNovacDzep] < 80) { SCM(playerid,-1,""SIVA"Nemate dovoljno novca "ZELENA"(80$)"SIVA"!"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; }
SCM(playerid,-1,""SPLAVA"[INFO]: "BELA"Rentali ste motor za "ZELENA"80$.");
g_NovacMinus(playerid,80);
FirmaNovac(92, 80);
}
if(AutaRent(GetPlayerVehicleID(playerid)))
{
if(PlayerInfo[playerid][pNovacDzep] < 120) { SCM(playerid,-1,""SIVA"Nemate dovoljno novca "ZELENA"(120$)"SIVA"!"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; }
SCM(playerid,-1,""SPLAVA"[INFO]: "BELA"Rentali ste auta za "ZELENA"120$.");
g_NovacMinus(playerid,120);
FirmaNovac(91, 120);
}
Rentano[playerid] = GetPlayerVehicleID(playerid);  TogglePlayerControllable(playerid, 1);
PlayerTextDrawHide(playerid,rent0[playerid]);
PlayerTextDrawHide(playerid,rent1[playerid]);
PlayerTextDrawHide(playerid,rent2[playerid]);
PlayerTextDrawHide(playerid,rent3[playerid]);
PlayerTextDrawHide(playerid,rent4[playerid]);
PlayerTextDrawHide(playerid,rent5[playerid]);
PlayerTextDrawHide(playerid,rent6[playerid]);
PlayerTextDrawHide(playerid,rent7[playerid]);
PlayerTextDrawHide(playerid,rent8[playerid]);
PlayerTextDrawHide(playerid,rent9[playerid]);
PlayerTextDrawHide(playerid,rent10[playerid]);
PlayerTextDrawHide(playerid,rent11[playerid]);
return 1;
}
else if(playertextid == rent8[playerid])
{
if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"UP:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
  if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,""SIVA"Niste u vozilu!");
    if(Zavezan[playerid] == 1) return SCM(playerid,-1,""SIVA"Ne mozete koristiti komandu jer ste zavezani!");
    if(IgracTazovan[playerid] == 1) return SCM(playerid,-1,""SIVA"Ne mozete koristiti komandu jer ste tazovani!");
if(StavljeneLisice[playerid] == 1) return SCM(playerid,-1,""SIVA"Ne mozete koristiti komandu jer imate lisice!");
RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1);
  PlayerTextDrawHide(playerid,rent0[playerid]);
PlayerTextDrawHide(playerid,rent1[playerid]);
PlayerTextDrawHide(playerid,rent2[playerid]);
  PlayerTextDrawHide(playerid,rent3[playerid]);
  PlayerTextDrawHide(playerid,rent4[playerid]);
  PlayerTextDrawHide(playerid,rent5[playerid]);
  PlayerTextDrawHide(playerid,rent6[playerid]);
  PlayerTextDrawHide(playerid,rent7[playerid]);
  PlayerTextDrawHide(playerid,rent8[playerid]);
  PlayerTextDrawHide(playerid,rent9[playerid]);
  PlayerTextDrawHide(playerid,rent10[playerid]);
  PlayerTextDrawHide(playerid,rent11[playerid]);
  return 1;
}

if(BiciklaRent(vozilo))
{
    if (Rentano[playerid] != vozilo)
    {
TogglePlayerControllable(playerid, 0);
SelectTextDraw(playerid, 0xFFFFBB00FF);
PlayerTextDrawShow(playerid,rent0[playerid]);
    PlayerTextDrawShow(playerid,rent1[playerid]);
    PlayerTextDrawShow(playerid,rent2[playerid]);
    PlayerTextDrawShow(playerid,rent3[playerid]);
    PlayerTextDrawShow(playerid,rent4[playerid]);
    PlayerTextDrawShow(playerid,rent5[playerid]);
    PlayerTextDrawShow(playerid,rent6[playerid]);
    PlayerTextDrawShow(playerid,rent7[playerid]);
    PlayerTextDrawShow(playerid,rent8[playerid]);
    PlayerTextDrawShow(playerid,rent9[playerid]);
    PlayerTextDrawShow(playerid,rent10[playerid]);
    PlayerTextDrawShow(playerid,rent11[playerid]);
    PlayerTextDrawSetString(playerid,rent6[playerid],"M~w~ozete rentati ovo~n~biciklo");
}
}
if(MotoRent(vozilo))
{
    if (Rentano[playerid] != vozilo)
    {
    TogglePlayerControllable(playerid, 0);
SelectTextDraw(playerid, 0xFFFFBB00FF);
PlayerTextDrawShow(playerid,rent0[playerid]);
    PlayerTextDrawShow(playerid,rent1[playerid]);
    PlayerTextDrawShow(playerid,rent2[playerid]);
    PlayerTextDrawShow(playerid,rent3[playerid]);
    PlayerTextDrawShow(playerid,rent4[playerid]);
    PlayerTextDrawShow(playerid,rent5[playerid]);
    PlayerTextDrawShow(playerid,rent6[playerid]);
    PlayerTextDrawShow(playerid,rent7[playerid]);
    PlayerTextDrawShow(playerid,rent8[playerid]);
    PlayerTextDrawShow(playerid,rent9[playerid]);
    PlayerTextDrawShow(playerid,rent10[playerid]);
    PlayerTextDrawShow(playerid,rent11[playerid]);
    PlayerTextDrawSetString(playerid,rent6[playerid],"M~w~ozete rentati ovaj~n~motor");
}
}
if(AutaRent(vozilo))
{
    if (Rentano[playerid] != vozilo)
    {
    TogglePlayerControllable(playerid, 0);
                SelectTextDraw(playerid, 0xFFFFBB00FF);
PlayerTextDrawShow(playerid,rent0[playerid]);
    PlayerTextDrawShow(playerid,rent1[playerid]);
    PlayerTextDrawShow(playerid,rent2[playerid]);
    PlayerTextDrawShow(playerid,rent3[playerid]);
    PlayerTextDrawShow(playerid,rent4[playerid]);
    PlayerTextDrawShow(playerid,rent5[playerid]);
    PlayerTextDrawShow(playerid,rent6[playerid]);
    PlayerTextDrawShow(playerid,rent7[playerid]);
    PlayerTextDrawShow(playerid,rent8[playerid]);
    PlayerTextDrawShow(playerid,rent9[playerid]);
    PlayerTextDrawShow(playerid,rent10[playerid]);
    PlayerTextDrawShow(playerid,rent11[playerid]);
    PlayerTextDrawSetString(playerid,rent6[playerid],"M~w~ozete rentati ovo~n~auto");
}
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): http://i.imgur.com/s4DcIzP.png
Naslov: Odg: [Pomoc] Rent
Poruka od: [CH]Lenon poslato Novembar 09, 2014, 13:56:20 POSLE PODNE
Postavi dio za paljenje vozila.
Naslov: Odg: [Pomoc] Rent
Poruka od: BlackJoe poslato Novembar 09, 2014, 17:52:14 POSLE PODNE
riješio sam