[Pomoc] Ulazak admina na server

Započeo ...Nikola..., Februar 25, 2012, 21:10:21 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Skripta koju koristim: CLRP Edit
Detaljan opis problema: Ovako napravio sam kad admin udje na srv da izbaci da je usao admin i sad napravio sam kad udje head admin ali problem je u tome sto meni izadje da je usao i admin i head admina pa neznam kako to da napravim da samo ako sam 1338 da izbaci head je usao a ne oba
Dio skripte: if(PlayerInfo[playerid][pAdmin] > 0)
{
format(string2, sizeof(string2), "| JV Admin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}
if(PlayerInfo[playerid][pGameMaster] > 0)
{
format(string2, sizeof(string2), "| JV GameMaster | %s je usao na server.", playername2, PlayerInfo[playerid][pGameMaster]);
SendGSMessage(ZELENKASTA,string2);
}
if(PlayerInfo[playerid][pAdmin] > 1337)
{
format(string2, sizeof(string2), ""COL_VIOLET"| JV HeadAdmin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): /

if(PlayerInfo[playerid][pAdmin] < 1338)
{
format(string2, sizeof(string2), "| JV Admin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}
if(PlayerInfo[playerid][pGameMaster] > 0)
{
format(string2, sizeof(string2), "| JV GameMaster | %s je usao na server.", playername2, PlayerInfo[playerid][pGameMaster]);
SendGSMessage(ZELENKASTA,string2);
}
if(PlayerInfo[playerid][pAdmin] > 1337)
{
format(string2, sizeof(string2), ""COL_VIOLET"| JV HeadAdmin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}
Poslednja Izmena: Februar 25, 2012, 21:14:34 POSLE PODNE od [CЯP]joXy_

Evo slike http://www.zaslike.com/files/w4bms6qgif69fpgbwh6e.png
Ako sam 1338 zelim da izbaci samo Head Admin
A Ako sam 1,2,3,4,1337 da izbaci Admin je usao
Ali problem je to sto kad postavim sebi 1338 izbaci i ovo plavo i ljubicasto a treba samo ljubicasto
;)
I mozete li mi napraviti da obicni admini nemogu se port do head admina ali da se head moze port do heada
Evo komande /goto
if(strcmp(cmd, "/goto", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, ""svpl"Koriscenje:{FFFFFF} /idido [ID Igraca]");
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][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) //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);
}
SendClientMessage(playerid, COLOR_GRAD1, "Teleportovani ste");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "(greska)Niste autorizovani da koristite ovu komandu!");
}
}
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Poslednja Izmena: Februar 25, 2012, 22:09:16 POSLE PODNE od ...Nikola...

if(PlayerInfo[playerid][pAdmin] < 1338 && PlayerInfo[playerid][pAdmin] > 0)
{
format(string2, sizeof(string2), "| JV Admin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}
if(PlayerInfo[playerid][pGameMaster] > 0)
{
format(string2, sizeof(string2), "| JV GameMaster | %s je usao na server.", playername2, PlayerInfo[playerid][pGameMaster]);
SendGSMessage(ZELENKASTA,string2);
}
if(PlayerInfo[playerid][pAdmin] > 1338)
{
format(string2, sizeof(string2), ""COL_VIOLET"| JV HeadAdmin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}
Poslednja Izmena: Februar 25, 2012, 22:34:11 POSLE PODNE od Marc McPawn

Sad neradi uopste ovo za ulazak na srv :S
Mozete li mi napraviti da obicni admini 1,2,3,4,1337 nemogu se port do head admina ali da se head moze port do heada
Evo komande /goto
if(strcmp(cmd, "/goto", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, ""svpl"Koriscenje:{FFFFFF} /idido [ID Igraca]");
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][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) //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);
}
SendClientMessage(playerid, COLOR_GRAD1, "Teleportovani ste");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "(greska)Niste autorizovani da koristite ovu komandu!");
}
}
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}

if(PlayerInfo[playerid][pAdmin] < 1338)
{
format(string2, sizeof(string2), "| JV Admin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}
if(PlayerInfo[playerid][pGameMaster] > 0)
{
format(string2, sizeof(string2), "| JV GameMaster | %s je usao na server.", playername2, PlayerInfo[playerid][pGameMaster]);
SendGSMessage(ZELENKASTA,string2);
}
if(PlayerInfo[playerid][pAdmin] == 1338)
{
format(string2, sizeof(string2), ""COL_VIOLET"| JV HeadAdmin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}


probaj tako



Citat: [BUL] Cile poslato Februar 25, 2012, 23:08:51 POSLE PODNE
if(PlayerInfo[playerid][pAdmin] < 1338)
{
format(string2, sizeof(string2), "| JV Admin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}
if(PlayerInfo[playerid][pGameMaster] > 0)
{
format(string2, sizeof(string2), "| JV GameMaster | %s je usao na server.", playername2, PlayerInfo[playerid][pGameMaster]);
SendGSMessage(ZELENKASTA,string2);
}
if(PlayerInfo[playerid][pAdmin] == 1338)
{
format(string2, sizeof(string2), ""COL_VIOLET"| JV HeadAdmin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}


probaj tako

ne vjerujem da bi radilo jer prema tvojoj def. server provjerava dali je igracev @lvl manji od 1338 a 0 je manja od 1338 !? tako da i kad udje igrac koji nije @ pisat ce da je usao @ ...nek pokusa kako sam ja stavio :P

dobro si stavio ali za 1338 admina nece radit, nek uzme moje :P



Pokušaj sad.

if(PlayerInfo[playerid][pAdmin] > 1)
{
format(string2, sizeof(string2), "| JV Admin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}
if(PlayerInfo[playerid][pGameMaster] > 1)
{
format(string2, sizeof(string2), "| JV GameMaster | %s je usao na server.", playername2, PlayerInfo[playerid][pGameMaster]);
SendGSMessage(ZELENKASTA,string2);
}
if(PlayerInfo[playerid][pAdmin] > 1338)
{
format(string2, sizeof(string2), ""COL_VIOLET"| JV Head Admin | %s je usao na server.", playername2, PlayerInfo[playerid][pAdmin]);
SendAdminMessage(SVETLOPLAVA,string2);
}
Poslednja Izmena: Februar 26, 2012, 08:15:51 PRE PODNE od Frank.

Cile Hvala radi  :) A od ovih ostalih neradi kako treba radi isto kao i moje sto je bilo a kod nekih neradi uopste.
A mozete li mi ovo za /goto napravim ja da se admini level 1,2,3,4,1337 nemogu port do 1338 ali nemoze se ni 1338 port do 1338 pa mozete li mi namestiti samo da se head moze do heada port i ostalih admina i igraca a da oni nemogu do njega?
Evo komande
if(strcmp(cmd, "/goto", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, ""svpl"Koriscenje:{FFFFFF} /goto [ID Igraca]");
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_GRAD1, "Nemozes se teleportovati do heada.");
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) //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);
}
SendClientMessage(playerid, COLOR_GRAD1, "Teleportovani ste");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "(greska)Niste autorizovani da koristite ovu komandu!");
}
}
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}