Pomoc oko komande /gethere

Započeo Cappone8989, Jun 27, 2019, 23:43:20 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Problem(error/warning): Ubacio sam komandu gethere i piše mi C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(16413) : error 017: undefined symbol "JBC_SetPlayerPos" a kada definisem izbaci mi više errora da nije definisano
Deo skripte: [ pawn ]YCMD:gethere(playerid, params[], help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"CG:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if (PlayerInfo[playerid][pGM] >= 2 || PlayerInfo[playerid][pAdmin] >= 1)
   {
      new gtIgrac;
      new string[256];
      if(sscanf(params, "u", gtIgrac)) return SCM(playerid, -1, ""CRVENA"CG:RP Pomoc | "BELA"/gethere [ID/Ime]");
      if(!IsPlayerConnected(gtIgrac)) return SCM(playerid, -1, "[CG:RP] "CRVENA"Taj igrac nije na serveru!");
        if(PlayerInfo[playerid][pGM] >= 1 && PlayerInfo[gtIgrac][pAdmin] >= 1) return SCM(playerid,-1,"SA:RP | "SPLAVA"Ne mozete portati igraca koji je jaci od vas!");
      if(PlayerInfo[playerid][pVip] >= 1 && PlayerInfo[gtIgrac][pAdmin] >= 1) return SCM(playerid,-1,"CG:RP | "SPLAVA"Ne mozete portati igraca koji je jaci od vas!");
      if(PlayerInfo[playerid][pTrazeniLevel] >= 1) return SCM(playerid,-1,"CG:RP | "SPLAVA"Ne mozete portati igraca jer imate trazeni level!");
      if(PlayerInfo[gtIgrac][pTrazeniLevel] >= 1) return SCM(playerid,-1,"CG:RP | "SPLAVA"Ne mozete portati igraca koji ima trazeni level!");
      GetPlayerPos(playerid, X, Y, Z);
      JBC_SetPlayerPos(gtIgrac, X + 2.0, Y, Z);
      SetPlayerVirtualWorld(gtIgrac, GetPlayerVirtualWorld(playerid));
      SetPlayerInterior(gtIgrac, GetPlayerInterior(playerid));
      format(string,sizeof(string),""CRVENA"[CG:RP] "SIVA"Teleportovao si %s-a do sebe!",GetName(gtIgrac));
      SCM(playerid,-1,string);
      format(string,sizeof(string),""CRVENA"[CG:RP] "SIVA"Admin %s te teleportovao do sebe!",GetName(playerid));
      SCM(gtIgrac,-1,string);
   }
   else
   {
      SCM(playerid, -1, ""CRVENA"[CG:RP] "BELA"Samo Admini & GameMaster (AL 1+ & GM 2+)!");
   }
   return 1;
}[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]vaš odgovor[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): link slike


Citat: Terzic poslato Jun 27, 2019, 23:47:34 POSLE PODNE
Samo obrisi JBC_
Obriso
sad mi gomilu errora prekazalo a kada izbrisem komandu nema errora evo ti errori:
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\pawno\include\dialogs.v2.7.inc(717) : error 017: undefined symbol "Dialog_OnPlayerClickPlayerTD"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(393) : error 017: undefined symbol "split"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(3278) : error 017: undefined symbol "GetName"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(3276) : symbol is never used: "playerid"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(3799) : error 017: undefined symbol "GetName"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(3830) : error 017: undefined symbol "KreirajRadar"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(3857) : error 017: undefined symbol "AkterLabelAnim"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(3915) : error 017: undefined symbol "Berza"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(3917) : error 017: undefined symbol "OpstinaSef"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(3918) : error 017: undefined symbol "UcitajGVozila"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(5481) : error 017: undefined symbol "VoziloJeAvion"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(5482) : error 017: undefined symbol "VoziloJeMotor"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(5483) : error 017: undefined symbol "VoziloJeBicikla"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(5485) : error 017: undefined symbol "VoziloJeBicikla"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(5491) : error 017: undefined symbol "DostavljacVozila"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(5547) : error 017: undefined symbol "UlicaKuce"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(5636) : error 017: undefined symbol "KreirajAtm"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6107) : error 017: undefined symbol "VozilaProtect"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6121) : error 017: undefined symbol "SavePlayer"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6718) : error 017: undefined symbol "split"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6802) : error 017: undefined symbol "IgracPolicajac"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6874) : error 017: undefined symbol "VoziloJeBicikla"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6877) : error 017: undefined symbol "GetSpeed"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6900) : error 017: undefined symbol "GetSpeed"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6902) : error 017: undefined symbol "VoziloJeAvion"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6905) : error 017: undefined symbol "GetName"
C:\Users\Windows\Desktop\Pes 06\BACKUP\ELTANO GAMING - UNITED STATES V2.0\eltano\gamemodes\EGaming.pwn(6938) : error 017: undefined symbol "GetSpeed"

Kao prvo koristi [pawno] za kodove.

Obrisi samo u toj komandi da vidiš hoće li bacati errore ?

evo ti cmd pa dodaj provjere i ostalo, mrzi me gledat code

[pawn]
CMD:gethere(playerid, const params[])
{
   new targetid = INVALID_PLAYER_ID;
   if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "CMD: /gethere [id]");
   if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Taj ID nije konektovan.");

   new Float:x, Float:y, Float:z;
   GetPlayerPos(playerid, x, y, z);
   SetPlayerPos(targetid, x+1, y, z+1);
   SetPlayerInterior(targetid, GetPlayerInterior(playerid));
   SetPlayerVirtualWorld(targetid, GetPlayerVirtualWorld(playerid));

   new name[MAX_PLAYER_NAME];
   GetPlayerName(targetid, name, sizeof(name));

   new str[60];
   format(str, sizeof(str), "Teleportovali ste igraca %s do sebe.", name);
   SendClientMessage(playerid, -1, str);

   GetPlayerName(playerid, name, sizeof(name));

   format(str, sizeof(str), "Admin %s vas je teleportovao do sebe.", name);
   SendClientMessage(targetid, -1, str);
   return 1;
}
[/pawn]

Citat: mumitza. poslato Jun 28, 2019, 00:11:44 PRE PODNE
evo ti cmd pa dodaj provjere i ostalo, mrzi me gledat code

[pawn]
CMD:gethere(playerid, const params[])
{
   new targetid = INVALID_PLAYER_ID;
   if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "CMD: /gethere [id]");
   if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Taj ID nije konektovan.");

   new Float:x, Float:y, Float:z;
   GetPlayerPos(playerid, x, y, z);
   SetPlayerPos(targetid, x+1, y, z+1);
   SetPlayerInterior(targetid, GetPlayerInterior(playerid));
   SetPlayerVirtualWorld(targetid, GetPlayerVirtualWorld(playerid));

   new name[MAX_PLAYER_NAME];
   GetPlayerName(targetid, name, sizeof(name));

   new str[60];
   format(str, sizeof(str), "Teleportovali ste igraca %s do sebe.", name);
   SendClientMessage(playerid, -1, str);

   GetPlayerName(playerid, name, sizeof(name));

   format(str, sizeof(str), "Admin %s vas je teleportovao do sebe.", name);
   SendClientMessage(targetid, -1, str);
   return 1;
}
[/pawn]
Bez potrebe dodeljena vrednost targetid kao i nepotrebno mesanje int i float (+1.0)

Ako oces malo bolji port evo ovako bi nesto bilo dobro

[pawn]
new Float:x,
Float:y,
Float:z,
Float:a;

GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid, a);

//Front of player
x += (1.0 * floatsin(-a, degrees));
y += (1.0 * floatcos(-a, degrees));
//Behind of player (to bi bilo u negativu)

SetPlayerPos(player, x,y,z + 0.25);

[/pawn]

Citat: Terzic poslato Jun 28, 2019, 00:59:18 PRE PODNE
Bez potrebe dodeljena vrednost targetid kao i nepotrebno mesanje int i float (+1.0)
I šta je problem? Opet radi i znači najbolje ga portat u iste koordinate pa da obojica zabodu ako na to misliš? isto je ili 1 ili 1.0 :)

Citat: Terzic poslato Jun 28, 2019, 00:59:18 PRE PODNE
Bez potrebe dodeljena vrednost targetid kao i nepotrebno mesanje int i float (+1.0)
Sta treba da stavi u float 0 ? ::)

Izvoli

[pawn]stock TeleportPlayerToPlayer(playerid, targetid)
{
   new
      Float:px,
      Float:py,
      Float:pz,
      Float:ang,
      Float:vx,
      Float:vy,
      Float:vz,
      virtualworld = GetPlayerVirtualWorld(targetid),
      interior = GetPlayerInterior(targetid);

   if(IsPlayerInAnyVehicle(targetid))
   {
      new vehicleid = GetPlayerVehicleID(targetid);

      GetVehiclePos(vehicleid, px, py, pz);
      GetVehicleZAngle(vehicleid, ang);
      GetVehicleVelocity(vehicleid, vx, vy, vz);
      pz += 2.0;
   }
   else
   {
      GetPlayerPos(targetid, px, py, pz);
      GetPlayerFacingAngle(targetid, ang);
      GetPlayerVelocity(targetid, vx, vy, vz);
      px -= floatsin(-ang, degrees);
      py -= floatcos(-ang, degrees);
   }

   SetPlayerVirtualWorld(playerid, virtualworld);
   SetPlayerInterior(playerid, interior);

   if(IsPlayerInAnyVehicle(playerid))
   {
      new vehicleid = GetPlayerVehicleID(playerid);

      SetVehiclePos(vehicleid, px, py, pz);
      SetVehicleZAngle(vehicleid, ang);
      SetVehicleVelocity(vehicleid, vx, vy, vz);
      SetVehicleVirtualWorld(vehicleid, virtualworld);
      LinkVehicleToInterior(vehicleid, interior);
   }
   else
   {
      SetPlayerPos(playerid, px, py, pz);
      SetPlayerFacingAngle(playerid, ang);
      SetPlayerVelocity(playerid, vx, vy, vz);
   }
}[/pawn]

EDIT: Muma molim te nauči osnove skriptanja iks de, ovaj tvoj kod je NEXT LEVEL wrong
Poslednja Izmena: Jun 28, 2019, 11:33:47 PRE PODNE od North Killer

Citat: North Killer poslato Jun 28, 2019, 11:31:07 PRE PODNE
Izvoli

[pawn]stock TeleportPlayerToPlayer(playerid, targetid)
{
   new
      Float:px,
      Float:py,
      Float:pz,
      Float:ang,
      Float:vx,
      Float:vy,
      Float:vz,
      virtualworld = GetPlayerVirtualWorld(targetid),
      interior = GetPlayerInterior(targetid);

   if(IsPlayerInAnyVehicle(targetid))
   {
      new vehicleid = GetPlayerVehicleID(targetid);

      GetVehiclePos(vehicleid, px, py, pz);
      GetVehicleZAngle(vehicleid, ang);
      GetVehicleVelocity(vehicleid, vx, vy, vz);
      pz += 2.0;
   }
   else
   {
      GetPlayerPos(targetid, px, py, pz);
      GetPlayerFacingAngle(targetid, ang);
      GetPlayerVelocity(targetid, vx, vy, vz);
      px -= floatsin(-ang, degrees);
      py -= floatcos(-ang, degrees);
   }

   SetPlayerVirtualWorld(playerid, virtualworld);
   SetPlayerInterior(playerid, interior);

   if(IsPlayerInAnyVehicle(playerid))
   {
      new vehicleid = GetPlayerVehicleID(playerid);

      SetVehiclePos(vehicleid, px, py, pz);
      SetVehicleZAngle(vehicleid, ang);
      SetVehicleVelocity(vehicleid, vx, vy, vz);
      SetVehicleVirtualWorld(vehicleid, virtualworld);
      LinkVehicleToInterior(vehicleid, interior);
   }
   else
   {
      SetPlayerPos(playerid, px, py, pz);
      SetPlayerFacingAngle(playerid, ang);
      SetPlayerVelocity(playerid, vx, vy, vz);
   }
}[/pawn]

EDIT: Muma molim te nauči osnove skriptanja iks de, ovaj tvoj kod je NEXT LEVEL wrong

Gospodine, da li vi znate da on nije trazio da porta se do targetida vec targetida da porta do sebe? Pravite ovako komplexne nacine koja svrha da on seta velocity brzinu vozila ovome, pa tipa ovaj da ide 100 na sat i po tvom kodu, ovaj kad se porta i on ce ici sto na sat tako da ce ga raspizdit u drvo, cemu svrha toga ? Hmm? Pises kod, a ni ne znas sta znaci, vazii

One And Only
Old Member
Since AVGUST 2013. :)
GAME OVER - SCRIPTING
SINCE 2009 - 2020

Citat: North Killer poslato Jun 28, 2019, 11:31:07 PRE PODNE
Izvoli

[pawn]stock TeleportPlayerToPlayer(playerid, targetid)
{
   new
      Float:px,
      Float:py,
      Float:pz,
      Float:ang,
      Float:vx,
      Float:vy,
      Float:vz,
      virtualworld = GetPlayerVirtualWorld(targetid),
      interior = GetPlayerInterior(targetid);

   if(IsPlayerInAnyVehicle(targetid))
   {
      new vehicleid = GetPlayerVehicleID(targetid);

      GetVehiclePos(vehicleid, px, py, pz);
      GetVehicleZAngle(vehicleid, ang);
      GetVehicleVelocity(vehicleid, vx, vy, vz);
      pz += 2.0;
   }
   else
   {
      GetPlayerPos(targetid, px, py, pz);
      GetPlayerFacingAngle(targetid, ang);
      GetPlayerVelocity(targetid, vx, vy, vz);
      px -= floatsin(-ang, degrees);
      py -= floatcos(-ang, degrees);
   }

   SetPlayerVirtualWorld(playerid, virtualworld);
   SetPlayerInterior(playerid, interior);

   if(IsPlayerInAnyVehicle(playerid))
   {
      new vehicleid = GetPlayerVehicleID(playerid);

      SetVehiclePos(vehicleid, px, py, pz);
      SetVehicleZAngle(vehicleid, ang);
      SetVehicleVelocity(vehicleid, vx, vy, vz);
      SetVehicleVirtualWorld(vehicleid, virtualworld);
      LinkVehicleToInterior(vehicleid, interior);
   }
   else
   {
      SetPlayerPos(playerid, px, py, pz);
      SetPlayerFacingAngle(playerid, ang);
      SetPlayerVelocity(playerid, vx, vy, vz);
   }
}[/pawn]

EDIT: Muma molim te nauči osnove skriptanja iks de, ovaj tvoj kod je NEXT LEVEL wrong
Nope, tvoj je next level wrong jer prvo nisi shvatio šta je tražio, drugo u čemu je problem? Sasvim je uredu i radi, samo nisam dodao provjeru da geta i vozilo ako je u njemu, i ne znam čemu velocity praviti... Pogrešno gledaš na obični samp i obično samp skriptanje :)

Pricam o tome da dodeljujes varijabli vrednost koju svakako ima

ovo samo doda pod gethere ispod provera koje ima, lol.

btw ovo za velocity npr ako je na planini ili na V podlozi da ne upadne vozilo u zemlju, haha

U slobodno vrijeme volim da dodjelujem varijablama vrijednost ;D

Citat: mumitza. poslato Jun 28, 2019, 15:21:24 POSLE PODNE
U slobodno vrijeme volim da dodjelujem varijablama vrijednost ;D
Kralju dodelio si vrednost a vec je ta ista..

EDIT: I Nigde nisam napisao da sam ja pisao taj kod nego Southclaws, btw lanmi idiote ala si ti meni glupo dete
Poslednja Izmena: Jun 28, 2019, 15:24:07 POSLE PODNE od North Killer