setadmin pomoc

Započeo [IF] mariomako, Jul 29, 2010, 23:31:47 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ovo je komanda za nekome dati admina ali kad idem ingame i kucam /setadmin 0 0 ne izage mi nista i plus nemenja mi admin level

CMD:setadmin(playerid, params[])
{
if(PlayerInfo[playerid][LoggedIn] != 1)
{
if(IgracInfo[playerid][Jezik] == 1)
{
SendClientMessage(playerid, COLOR_RED, "Ìîðà äà ñå íà¼àâèòå çà ìîæåòå äà ¼à êîðèñòèòå îâàà êîìàíäà.");
}
    if(IgracInfo[playerid][Jezik] == 2)
{
SendClientMessage(playerid, COLOR_RED, "Morate da se ulogirate za da bi mogli koristiti ovu komandu.");
}
    if(IgracInfo[playerid][Jezik] == 3)
{
SendClientMessage(playerid, COLOR_RED, "You must login to use this command.");
}
}
if(PlayerInfo[playerid][Level] >= 4)
{
new tmp[256], tmp2[256], Index;
tmp = strtok(params,Index), tmp2 = strtok(params,Index);

if(!strlen(params))
{
if(IgracInfo[playerid][Jezik] == 1)
{
SendClientMessage(playerid, COLOR_RED, "/setadmin [ID] [àäìèí íèâî]");
}
    if(IgracInfo[playerid][Jezik] == 2)
{
SendClientMessage(playerid, COLOR_RED, "/setadmin [ID] [admin level]");
}
    if(IgracInfo[playerid][Jezik] == 3)
{
SendClientMessage(playerid, COLOR_RED, "/setadmin [ID] [admin level]");
}
return 1;
}

new kohde, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
kohde = strval(tmp);

if(!strlen(tmp2))
{
if(IgracInfo[playerid][Jezik] == 1)
{
SendClientMessage(playerid, COLOR_RED, "/setadmin [ID] [àäìèí íèâî]");
}
    if(IgracInfo[playerid][Jezik] == 2)
{
SendClientMessage(playerid, COLOR_RED, "/setadmin [ID] [admin level]");
}
    if(IgracInfo[playerid][Jezik] == 3)
{
SendClientMessage(playerid, COLOR_RED, "/setadmin [ID] [admin level]");
}
return 1;
}
level = strval(tmp2);

if(!IsPlayerConnected(kohde))
  {
if(IgracInfo[playerid][Jezik] == 1)
{
SendClientMessage(playerid,COLOR_RED,"Íåòî÷åí ID.");
}
  if(IgracInfo[playerid][Jezik] == 2)
  {
  SendClientMessage(playerid,COLOR_RED,"Krivi ID.");
  }
if(IgracInfo[playerid][Jezik] == 3)
{
SendClientMessage(playerid,COLOR_RED,"Wrong ID.");
}
        return 1;
}

if(PlayerInfo[kohde][LoggedIn] != 1)
{
if(IgracInfo[playerid][Jezik] == 1)
{
SendClientMessage(playerid,COLOR_RED,"Èãðà÷îò ìîðà äà áèäå íà¼àâàí çà äà ìó äàäåòå Àäìèí íèâî.");
}
  if(IgracInfo[playerid][Jezik] == 2)
  {
  SendClientMessage(playerid,COLOR_RED,"Igrac mora biti ulogiran da biste mu dali admin level.");
  }
if(IgracInfo[playerid][Jezik] == 3)
{
SendClientMessage(playerid,COLOR_RED,"Player must be logged in to submit admin level.");
}
return 1;
}
if(level == PlayerInfo[kohde][Level])
{
if(IgracInfo[playerid][Jezik] == 1)
{
SendClientMessage(playerid,COLOR_RED,"Èãðà÷îò âåå å òîà Àäìèí íèâî.");
}
  if(IgracInfo[playerid][Jezik] == 2)
  {
  SendClientMessage(playerid,COLOR_RED,"Igrac je vec taj Admin level.");
  }
if(IgracInfo[playerid][Jezik] == 3)
{
SendClientMessage(playerid,COLOR_RED,"The player is already admin Level.");
}
return 1;
}

GetPlayerName(kohde, playername, sizeof(playername));
GetPlayerName(playerid, adminname, sizeof(adminname));

        new string[128];
if(level > 0)
{
if(IgracInfo[kohde][Jezik] == 1)
{
format(string,sizeof(string),"Àäìèíèñòðàòîð %s ãî íàìåñòè òâîåòî àäìèí íèâî íà: %d",adminname, level);
}
  if(IgracInfo[kohde][Jezik] == 2)
  {
  format(string,sizeof(string),"Admin %s je namjestio tvoj admin level na: %d",adminname, level);
  }
if(IgracInfo[kohde][Jezik] == 3)
{
format(string,sizeof(string),"Administrator %s has set your admin level on: %d",adminname, level);
}
return 1;
}
SendClientMessage(kohde,COLOR_LIGHTGREEN,string);

new file[256];
format(file,sizeof(file),"Korisnici/%s.ini", PlayerName(playerid));

dini_IntSet(file,"Level",level);
PlayerInfo[kohde][Level] = level;

PlayerPlaySound(kohde,1057,0.0,0.0,0.0);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
return 1;

}

Kak to mislis ne izlazi nista, UNKNOWN COMMAND ili sto?


RESPECT 4 EVER: John, GLC,bAndzi, Nikola, Sop, Zoki, Bruno_Venuti, Mele, Luka P,ExtremePower,Wang(neki kineski frajer)

NAJBOLJI CITATI:
Citat: [GF]Alive poslato Jun 24, 2010, 18:20:19 POSLE PODNE
Paizte ljud mozda je KayLoger! ! !
MOJI RADOVI:
[FS]Trofeji

to ti je kao da izadje unknown command. ali posto nema toga on. onda ti nista ne zbaci. nego samo kad upises komadnu ne dogodi se nikakva akcija. xD

Citat: LordShigi poslato Jul 29, 2010, 23:33:57 POSLE PODNE
Kak to mislis ne izlazi nista, UNKNOWN COMMAND ili sto?

ne nema nikakva poruak da mi je neko editirao moji level i ne smeni moji level u dini fajl