[Pomoc]/gethere

Započeo caupton, Mart 30, 2011, 14:48:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Svoj od 0
Detaljan opis problema:Ovako kako da namestim da vlasnik servera tj. admin lvl 1340 moze da teleportuje sve admin lvl znaci 1339,1338,1337,1336, itd.
Dio skripte:///
Neke slike/video za lakse dobivanje pomoci(neobavezno):///
Ps.Hvala Unapred

Probaj ovo:

    if(strcmp(cmd, "/getallhere", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
            for(new i = 0; i < MAX_PLAYERS; i ++)
               {
         if(IsPlayerConnected(i))
         {
format(string, sizeof(string), "Administrator %s je teleportovao sve igrace do sebe.", sendername);
SendClientMessage(i, COLOR_RED, string);
new Float:ix, Float:iy, Float:iz;
GetPlayerPos(playerid, ix, iy, iz);
SetPlayerInterior(i, GetPlayerInterior(playerid));
SetPlayerPos(i, ix, iy, iz+1);
new PlayerName[30];
GetPlayerName(playerid, PlayerName, 30);
printf("[Admin] %s je koristio /getallhere da teleportira sve igrace", PlayerName);
}
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nemas ovlascenje za tu komandu!");
}
}
else
{
                SendClientMessage(playerid, COLOR_RED, "Moras biti logiran da bi koristio ovu komandu!");
       }
  return 1;
}

Citat: [BE] Monk poslato Mart 30, 2011, 14:50:51 POSLE PODNE
Probaj ovo:

    if(strcmp(cmd, "/getallhere", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
            for(new i = 0; i < MAX_PLAYERS; i ++)
               {
         if(IsPlayerConnected(i))
         {
format(string, sizeof(string), "Administrator %s je teleportovao sve igrace do sebe.", sendername);
SendClientMessage(i, COLOR_RED, string);
new Float:ix, Float:iy, Float:iz;
GetPlayerPos(playerid, ix, iy, iz);
SetPlayerInterior(i, GetPlayerInterior(playerid));
SetPlayerPos(i, ix, iy, iz+1);
new PlayerName[30];
GetPlayerName(playerid, PlayerName, 30);
printf("[Admin] %s je koristio /getallhere da teleportira sve igrace", PlayerName);
}
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nemas ovlascenje za tu komandu!");
}
}
else
{
                SendClientMessage(playerid, COLOR_RED, "Moras biti logiran da bi koristio ovu komandu!");
       }
  return 1;
}

Nece da radi :(

Citat: Nikola_Hawks poslato Mart 30, 2011, 14:53:19 POSLE PODNE
Citat: [BE] Monk poslato Mart 30, 2011, 14:50:51 POSLE PODNE
Probaj ovo:

    if(strcmp(cmd, "/getallhere", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
            for(new i = 0; i < MAX_PLAYERS; i ++)
               {
         if(IsPlayerConnected(i))
         {
format(string, sizeof(string), "Administrator %s je teleportovao sve igrace do sebe.", sendername);
SendClientMessage(i, COLOR_RED, string);
new Float:ix, Float:iy, Float:iz;
GetPlayerPos(playerid, ix, iy, iz);
SetPlayerInterior(i, GetPlayerInterior(playerid));
SetPlayerPos(i, ix, iy, iz+1);
new PlayerName[30];
GetPlayerName(playerid, PlayerName, 30);
printf("[Admin] %s je koristio /getallhere da teleportira sve igrace", PlayerName);
}
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nemas ovlascenje za tu komandu!");
}
}
else
{
                SendClientMessage(playerid, COLOR_RED, "Moras biti logiran da bi koristio ovu komandu!");
       }
  return 1;
}

Nece da radi :(
pokazi sta izbaci

nista ne izbaci znaci nema nijednog erora..ali kada upalim na serveru..jednostavno nece da radi :S

Pa ako si sam na serveru naravno da nece da ti radi,trebas da imas jos nekog i onda da probate,ti ukucas /getallhere i onda ce da se porta do tebe,razumes?

Kako si definirao admine?? ?? ?? Ako je ovo mod od nula mi ti nemozemo pomoci jer nisi stavio defnicije... lal

if(strcmp(cmd, "/gethere", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /gethere [playerid/PartOfName]");
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] >= 1340 )
{
SendClientMessage(playerid, COLOR_GRAD1, "Ask the admin to goto you.");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1 )
{
GetPlayerPos(playerid, plocx, plocy, plocz);
if(PlayerInfo[playerid][pInt] > 0)
{
SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
PlayerInfo[plo][pInt] = PlayerInfo[playerid][pInt];
PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(plo,0);
}
if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(plo,1);
PlayerInfo[plo][pInt] = 1;
}
if (GetPlayerState(plo) == 2)
{
TelePos[plo][0] = 0.0;
TelePos[plo][1] = 0.0;
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
}
SendClientMessage(plo, COLOR_GRAD1, "   Teleportiran si");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlasten!");
}
}
}
else
{
format(string, sizeof(string), "   %d je offline.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}