[POMOC]Oko vuci

Započeo Sarkenzo
•5. Sep. 2014.• Zaključano
237
pregleda
5
postova
Sarkenzo
4
Shot Caller
Balkan SA:MPBalkan SA:MP
SA-MP DoprinosSA-MP Doprinos
5. Sep. 2014.
Skripta koju koristim: GTARP
Detaljan opis problema: Imam komandu vuci, ne znam kako da napravim da pise da vec nekog vucem, i kada kuca pusti da pise vi nikog ne vucete..
Dio skripte:

forward Drag(giveplayerid, playerid);
//------------------------------------------------------------------------------------------------------
new DragTimer;

  if (strcmp(cmd, "/vuci", true) == 0)
{
    if(gTeam == 2 || IsACop(playerid))
{
  tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
  if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTI: /vuci [playerid/Deo Imena]");
return 1;
}
if(!IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "%d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid,COLOR_GREY, string);
return 1;
}
if(WantedLevel < 1 && WantedPoints < 1)return SCM(playerid, COLOR_GREY, "Igrac nije osumnjicen!");
            if(PlayerCuffed < 1)return SCM(playerid, COLOR_GREY, "Igracu nisu stavljene lisice!");
if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 3)
{
SendClientMessage(playerid, COLOR_GREY, "Previse ste udaljeni od tog igraca!.");
  return 1;
  }
  if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_GREY, "Nemozete vuci sami sebe!");
return 1;
}
if(DragTimer <= 0)
{
if(IsPlayerConnected(giveplayerid) == 1)
{
  GetPlayerName(giveplayerid, sendername, sizeof(sendername));
  GetPlayerName(playerid, playername, sizeof(playername));
  format(string, sizeof(string), "%s vuce %s", playername, sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
DragTimer = SetTimerEx("Drag", 1000, 1, "ii", playerid, giveplayerid);
TogglePlayerControllable(giveplayerid, 0);
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "  Niste Policajac / UDB agent / Nacionalna Garda !");
}
return 1;
}
  if (strcmp(cmd, "/pusti", true) == 0)
{
  tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTI: /pusti [playerid/Deo Imena]");
return 1;
}
  if(gTeam == 2 || IsACop(playerid))
{
if(DragTimer >= 0)
{
      if(WantedLevel < 1 && WantedPoints < 1)return SCM(playerid, COLOR_GREY, "Igrac nije osumnjicen!");
              if(PlayerCuffed < 1)return SCM(playerid, COLOR_GREY, "Igracu nisu stavljene lisice!");
  if(PlayerCuffed == 1)
{
TogglePlayerControllable(giveplayerid, 0);
}
  GetPlayerName(giveplayerid, sendername, sizeof(sendername));
  GetPlayerName(playerid, playername, sizeof(playername));
  format(string, sizeof(string), "%s je pustio %s", playername, sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
KillTimer(DragTimer);
DragTimer = 0;
TogglePlayerControllable(giveplayerid, 1);
return 1;
}
    }
else
{
SendClientMessage(playerid, COLOR_GREY, "  Niste Policajac / UDB agent / Nacionalna Garda !");
}
return 1;
}
Amar Tinjak
4
Enforcer
Balkan SA:MPBalkan SA:MP
SA-MP DoprinosSA-MP Doprinos
5. Sep. 2014.
u vuci komandi postavi ovu provjeru
if(DragTimer >= 0) return SCM(playerid,-1,"Vi vec nekoga vucete").

u pusti ovako
if(DragTimer == 0) return SCM(playerid,-1,"Vi nikoga ni ne vucete");
Sarkenzo
4
Shot Caller
Balkan SA:MPBalkan SA:MP
SA-MP DoprinosSA-MP Doprinos
6. Sep. 2014.
Kada kucam vuci pise vec vucete nekog.A kada hocu da pustim pise da ne vucem nikog.Ne rade ti ovi kodovi.Znaci nece da vuce kao da si mu stavio ako mu je varijabla manja od 1 da vuce/ne vuce

if(DragTimer >= 0) return SCM(playerid,COLOR_GREY,"Vec vucete nekoga!");         
if(DragTimer == 0) return SCM(playerid,COLOR_GREY,"Ne vucete nikoga!");
Sarkenzo
4
Shot Caller
Balkan SA:MPBalkan SA:MP
SA-MP DoprinosSA-MP Doprinos
7. Sep. 2014.
BUMP!
Drobnjak
5
Crime Lord
Balkan SA:MPBalkan SA:MP
SA-MP DoprinosSA-MP Doprinos
7. Sep. 2014.
if(DragTimer == 1) return SCM(playerid,COLOR_GREY,"Vec vucete nekoga!");          
if(DragTimer == 0) return SCM(playerid,COLOR_GREY,"Ne vucete nikoga!");

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha