Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: [G-Unit] Mich poslato Maj 21, 2011, 16:43:53 POSLE PODNE

Naslov: [Pomoc] /goto
Poruka od: [G-Unit] Mich poslato Maj 21, 2011, 16:43:53 POSLE PODNE
Skripta koju koristim:Cyber
Detaljan opis problema:kako da stavim u komandu /goto da se ne mogu admini portat do Head Admina
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Naslov: Odg: [Pomoc] /goto
Poruka od: Gotti747 poslato Maj 21, 2011, 16:45:19 POSLE PODNE
na osnovu cega da ti napravimo ?
Naslov: Odg: [Pomoc] /goto
Poruka od: MaX91 poslato Maj 21, 2011, 16:50:51 POSLE PODNE
Daj nam CMD, jer ne možemo ovako.
Naslov: Odg: [Pomoc] /goto
Poruka od: [G-Unit] Mich poslato Maj 21, 2011, 16:59:27 POSLE PODNE
if(strcmp(cmd, "/goto", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, CRVENA, "Komanda: /goto [IgracevID/DeoImena]");
            return 1;
         }
         new Float:plocx,Float:plocy,Float:plocz;
         new plo;
         plo = ReturnUser(tmp);
         if (IsPlayerConnected(plo))
         {
             if(plo != INVALID_PLAYER_ID)
             {
               if (PlayerInfo[playerid][Admin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
               {
                  if(Spectate[playerid] != 255)
                  {
                     Spectate[playerid] = 256;
                  }
                  GetPlayerPos(plo, plocx, plocy, plocz);
                  if(PlayerInfo[plo][pInt] > 0)
                  {
                     SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
                     PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
                     PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
                  }
                  if(PlayerInfo[playerid][pInt] == 0)
                  {
                     SetPlayerInterior(playerid,0);
                  }
                  if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8
                  {
                     SetPlayerInterior(playerid,1);
                     PlayerInfo[playerid][pInt] = 1;
                  }
                  if (GetPlayerState(playerid) == 2)
                  {
                     new tmpcar = GetPlayerVehicleID(playerid);
                     SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                     TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
                  }
                  else
                  {
                     SetPlayerPos(playerid,plocx,plocy+2, plocz);
                  }

               }
               else
               {
                  SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}G-Unit{FFFFFF}] {C3C3C3}Samo Admini!");
               }
            }
         }
         else
         {
            format(string, sizeof(string), "   %d is not an active player.", plo);
            SendClientMessage(playerid, COLOR_GRAD1, string);
         }
      }
      return 1;
   }
Naslov: Odg: [Pomoc] /goto
Poruka od: K4[Я]!K3 poslato Maj 21, 2011, 17:01:44 POSLE PODNE
COMMAND:doigraca(playerid, params[])
{
if(IsPlayerAdmin(playerid)) // rcon admin
new
   id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -89, "INFO: /doigraca [ID igraca]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1,"Igrac nije online!");
else {
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x,y,z);
SetPlayerPos(playerid, x,y,z+1);
SendClientMessage(playerid, -1,"Teleportiran si!");
}
return true;
}
Naslov: Odg: [Pomoc] /goto
Poruka od: System32 poslato Maj 21, 2011, 17:03:36 POSLE PODNE
Citat: [ЯPF] !K4[Я]!K3 poslato Maj 21, 2011, 17:01:44 POSLE PODNE
COMMAND:doigraca(playerid, params[])
{
if(IsPlayerAdmin(playerid)) // rcon admin
new
   id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -89, "INFO: /doigraca [ID igraca]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1,"Igrac nije online!");
else {
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x,y,z);
SetPlayerPos(playerid, x,y,z+1);
SendClientMessage(playerid, -1,"Teleportiran si!");
}
return true;
}

slipcu on ne koristi ZCMD i treba mu da se nemozes portat do head a kod tebe se svi mogu!
Naslov: Odg: [Pomoc] /goto
Poruka od: [G-Unit] Mich poslato Maj 21, 2011, 17:03:44 POSLE PODNE
jel to to?
Naslov: Odg: [Pomoc] /goto
Poruka od: K4[Я]!K3 poslato Maj 21, 2011, 17:12:30 POSLE PODNE
Citat: [AG] System32 poslato Maj 21, 2011, 17:03:36 POSLE PODNE
slipcu on ne koristi ZCMD i treba mu da se nemozes portat do head a kod tebe se svi mogu!

ti suti svega ti :D
mogu valjda pogrijesit nekad :/


Citat: Barney poslato Maj 21, 2011, 17:03:44 POSLE PODNE
jel to to?
COMMAND:doigraca(playerid, params[])
{
   if(!IsPlayerAdmin(playerid)) return 1;
   new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -89, "INFO: /doigraca [ID igraca]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1,"Igrac nije online!");
else {
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x,y,z);
SetPlayerPos(playerid, x,y,z+1);
SendClientMessage(playerid, -1,"Teleportiran si!"); }
return true;
}


to je to xd
Naslov: Odg: [Pomoc] /goto
Poruka od: [G-Unit] Mich poslato Maj 21, 2011, 17:13:33 POSLE PODNE
ne koristim zcmd komaud nego obicu i ocu da se ne mogu portat do heada a to tu ja ne vidim?
Naslov: Odg: [Pomoc] /goto
Poruka od: K4[Я]!K3 poslato Maj 21, 2011, 17:16:25 POSLE PODNE
Citat: Barney poslato Maj 21, 2011, 17:13:33 POSLE PODNE
ne koristim zcmd komaud nego obicu i ocu da se ne mogu portat do heada a to tu ja ne vidim?

neznam ja kako je to u tebe definirano
a ako ne kroistis zcmd i sscanf nemoj ni skriptat :P
Naslov: Odg: [Pomoc] /goto
Poruka od: Wang poslato Maj 21, 2011, 17:30:42 POSLE PODNE
Pokusaj ovako

}
if(strcmp(cmd, "/goto", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_CRVENA, "KORISTITE: /goto [ID/Ime]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
   if(plo != INVALID_PLAYER_ID)
   {
if (PlayerInfo[plo][pAdmin] > 1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Ne mozete se portati do Head Admina.");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
{
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(playerid,0);
}
if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0)
{
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste.");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizirani za koristenje ove komande.");
}
}
}
else
{
format(string, sizeof(string), "   %d nije online.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Naslov: Odg: [Pomoc] /goto
Poruka od: [TS] Killer NO. 1 poslato Maj 21, 2011, 17:31:44 POSLE PODNE
Cyber je pola pola imas i  zcmd i strcmp
Naslov: Odg: [Pomoc] /goto
Poruka od: boris.pwn poslato Maj 21, 2011, 19:36:20 POSLE PODNE
To ti je bezvese ako samo headadmin se moze portati
Naslov: Odg: [Pomoc] /goto
Poruka od: Wang poslato Maj 21, 2011, 19:39:50 POSLE PODNE
Citat: Richard Cyper poslato Maj 21, 2011, 19:36:20 POSLE PODNE
To ti je bezvese ako samo headadmin se moze portati
Ovo ti nije tema u kojoj mu dajes savjete nego u kojoj mu pomazes.
Naslov: Odg: [Pomoc] /goto
Poruka od: [G-Unit] Mich poslato Maj 21, 2011, 20:00:13 POSLE PODNE
kao prvo krivo si me skuzio mogu se svi portat ali da se obivni admini ne portaju do Heada citaj malo xD i drugo pokusao sam ubacit onu komandu koju mi je netko dao ali ne radi?
Naslov: Odg: [Pomoc] /goto
Poruka od: BloodMaster poslato Maj 21, 2011, 20:29:28 POSLE PODNE
if(strcmp(cmd, "/goto", true) == 0)
  {
      if(IsPlayerConnected(playerid))
      {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
           SendClientMessage(playerid, CRVENA, "Komanda: /goto [IgracevID/DeoImena]");
           return 1;
        }
        new Float:plocx,Float:plocy,Float:plocz;
        new plo;
        plo = ReturnUser(tmp);
        if(PlayerInfo[plo][pAdmin] == 1338) return SendClientMessage(playerid, CRVENA, "Nemozes se port-ati do head admina!");
        if (IsPlayerConnected(plo))
        {
            if(plo != INVALID_PLAYER_ID)
            {
              if (PlayerInfo[playerid][Admin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
              {
                 if(Spectate[playerid] != 255)
                 {
                    Spectate[playerid] = 256;
                 }
                 GetPlayerPos(plo, plocx, plocy, plocz);
                 if(PlayerInfo[plo][pInt] > 0)
                 {
                    SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
                    PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
                    PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
                 }
                 if(PlayerInfo[playerid][pInt] == 0)
                 {
                    SetPlayerInterior(playerid,0);
                 }
                 if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8
                 {
                    SetPlayerInterior(playerid,1);
                    PlayerInfo[playerid][pInt] = 1;
                 }
                 if (GetPlayerState(playerid) == 2)
                 {
                    new tmpcar = GetPlayerVehicleID(playerid);
                    SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                    TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
                 }
                 else
                 {
                    SetPlayerPos(playerid,plocx,plocy+2, plocz);
                 }

              }
              else
              {
                 SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}G-Unit{FFFFFF}] {C3C3C3}Samo Admini!");
              }
           }
        }
        else
        {
           format(string, sizeof(string), "   %d is not an active player.", plo);
           SendClientMessage(playerid, COLOR_GRAD1, string);
        }
     }
     return 1;
  }