[POMOC]PORT

Započeo {ZOKA}{BOND}
7. Feb. 2015. Zaključano
215
pregleda
7
postova
PopCapo
4
Made Man
7. Feb. 2015.
Skripta koju koristim:GTARP
Detaljan opis problema:kako da napravim kad se porta neko do igraca /goto da adminima ispise Admin/supporter se portao do igraca tog i tog
i kako da napravim kad nekog ubije da nama adminima ispise igrac je ubio igraca
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):

eto komanda /goto i onplayerdeath

if(strcmp(cmd, "/goto", true) == 0)
{
if(PlayerInfo >= 1)
{
if(Prisustvuje == true)
{
SCM(playerid,SVETLOPLAVA,"Na eventu si ne mozes koristiti /goto");
}
return 1;
  }
        if(PlayerInfo >= 1) return SCM(playerid,SVETLOPLAVA,"U zatvoru/Jailu ste, ne mozete se teleportovati");
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /goto [ID Igraca/Deo Imena]");
return 1;
}
if(WantedLevel > 0 && PlayerInfo < 4 || WantedLevel > 0 && PlayerInfo > 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "Imate Wanted ne mozete se portovati !");
            return 1;
        }
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
    if(plo != INVALID_PLAYER_ID)
    {
      if(WantedLevel > 0 && PlayerInfo < 4)
                    {
                    SendClientMessage(playerid, COLOR_GREY, "Taj igrac ima wanted ne mozete se portovati do njega !");
                    return 1;
                    }
if(PlayerInfo > PlayerInfo)
{
SendClientMessage(playerid,SVETLOPLAVA,"Ne mozes se teleportovati do nekog ko je jaci od vas");
return 1;
}
if (PlayerInfo >= 1 || PlayerInfo >= 1 || PlayerInfo >= 1)
{
if(Spectate != 255)
{
Spectate = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo > 0)
{
SetPlayerInterior(playerid,PlayerInfo);
PlayerInfo = PlayerInfo;
PlayerInfo = PlayerInfo;
}
if(PlayerInfo == 0)
{
SetPlayerInterior(playerid,0);
}
if(plocz > 530.0 && PlayerInfo == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(playerid,1);
PlayerInfo = 1;
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos = 0.0;TelePos = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SendClientMessage(playerid, COLOR_GRAD1, "Teleportovani ste");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Niste ovlasteni da koristite tu komandu!");
}
}
}
else
{
format(string, sizeof(string), "  %d nije aktivan igrac.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{
if(gettime() - GetPVarInt(playerid,"PlayerLastDeath") < 1) Kick(playerid);
SetPVarInt(playerid,"PlayerLastDeath",gettime());
new name;
new killerr;
new string;
new playercash;
new victimteam;
new Float:px,Float:py,Float:pz;
new killerteam;

    if(IsInBus == 1)
{
IsInBus = 0;
  KillTimer(Timer1);
KillTimer(Timer2);
}
if(zonatime > 0)
    {
    KillTimer(zonatimer);
    new id = zonaid;
    GangZoneStopFlashForAll(ZonaID);
    PlayerTextDrawHide(playerid, klecanjetd);
    zonaid -= 1;
    zonatime -= 1;
    SCM(playerid,GRAD2,"Niste uspeli da zauzmete teritoriju, spreceni ste!");
    }
if(gPlayerUsingLoopingAnim == 1)
{
gPlayerUsingLoopingAnim = 0;
}
if(IsOnePlayAnim == 1)
{
IsOnePlayAnim = 0;
}
if(BackOut == 1)
{
    BackOut = 0;
}

if(ecp != 0)
{
Prisustvuje = false;
vorcp = 0;

}
Rudimental
5
OG Legend
7. Feb. 2015.
Za port u komandu stavi nesto tipa
if (PlayerInfo > 0)
{
    format(string, sizeof(string), "Admin %s se portao do igraca %s", GetName(playerid), GetName(plo));
    SendAdminMessage(-1, string);
}


A to za ubijanje igraca u public OnPlayerDeath
if (killerid != INVALID_PLAYER_ID)
{
    format(string, sizeof(string), "%s (%d) je ubijen od strane igraca %s (%d)", GetName(playerid), playerid, GetName(killerid), killerid);
    SendAdminMessage(-1, string);
}


E sad ako nemas string samo ga definises to valjda znas a ako nemas GetName evo ti stock pa ga stavi negde na kraj scripte...

stock GetName(playerid)
{
    new pName;
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    return pName;
}
PopCapo
4
Made Man
7. Feb. 2015.
ae mozes mi ti to odradit u /goto komand stavio sam cmd /goto
Rudimental
5
OG Legend
7. Feb. 2015.
Pa jesi tolko lenj ja ti odradim sve a tebi tesko to da ubacis u komandu ?
PopCapo
4
Made Man
7. Feb. 2015.
ne nisam lenj  🙂
nego da nesto ne zeznem hh ubacio sam i radi fala za ovo ae jo sovo

e moze mi ovo pogledas baca mi errore ubacio sam ove tdove i treba mi tako da bude ovo playerid valjda treba neki stock nzm kako za ovaj playerid? da radi i prije mi je bacalo a nzm kako da def ovo playerid


ZGRP.PWN(13269) : error 017: undefined symbol "playerid"
ZGRP.PWN(13270) : error 017: undefined symbol "playerid"
ZGRP.PWN(13271) : error 017: undefined symbol "playerid"
ZGRP.PWN(13272) : error 017: undefined symbol "playerid"
ZGRP.PWN(13273) : error 017: undefined symbol "playerid"
ZGRP.PWN(13274) : error 017: undefined symbol "playerid"
ZGRP.PWN(13275) : error 017: undefined symbol "playerid"

tdmd8 = TextDrawCreate(38.000000, 309.000000, "UBISTAVA: 6000");
TextDrawBackgroundColor(tdmd8, 255);
TextDrawFont(tdmd8, 2);
TextDrawLetterSize(tdmd8, 0.230000, 1.199999);
TextDrawColor(tdmd8, -65281);
TextDrawSetOutline(tdmd8, 1);
Rudimental
5
OG Legend
7. Feb. 2015.
Gde si to ubacio u koji callback ?
arnel avdic
5
Underboss
7. Feb. 2015.
taj textdraw mora ici pod onplayerconnect callback ukoliko si ga stavio pod ongamemode a jesi, a to mozes i ovako napravit stock td(playerid)
{
pa ti textdrawovi
}
i onda pod onplayerconnect stavis td(playerid);

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha