[POMOC] Kick, Ban i Pm

Započeo Mrki 789, Februar 12, 2012, 23:32:34 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 5 gostiju pregledaju ovu temu.

Skripta koju koristim: CL
Detaljan opis problema: ja sam ubacio novi /BAN novi /kick i novi /PM ali nevelja nesto..
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno): http://www.zaslike.com/viewer.php?file=hxqz0oti504mwbyfj12j.png  http://www.zaslike.com/viewer.php?file=ryf91iata26pbfozykvl.png


if(strcmp(cmd, "/ban", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        new playersip[64];
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /ban [ID Igraca/Dio Imena] [razlog]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
    if(IsPlayerConnected(giveplayerid))
    {
if(PlayerInfo[giveplayerid][pAdmin] >= 1338)
{
SendClientMessage(playerid, COLOR_WHITE, "("COL_RED"YB{FFFFFF}!) Pokusaj BANA Admina veceg levela nije uspjelo!");
return 1;
}
        if(giveplayerid != INVALID_PLAYER_ID)
        {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerIp(giveplayerid,playersip,sizeof(playersip));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /ban [ID Igraca/Dio Imena] [razlog]");
return 1;
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
SendClientMessage(giveplayerid,COLOR_NICERED, "____________________________________________________________________________________");
SendClientMessage(giveplayerid,COLOR_LIGHTRED, "ISKLJUCENI STE SA SERVERA(Banani)!Pazljivo procitajte text!");
format(string,sizeof(string), "%s (ID: %d) je iskljucen (Banan) sa servera od %s",giveplayer, giveplayerid, sendername);
SendClientMessage(giveplayerid, COLOR_NICERED, string);
BanLog(string);
format(string,sizeof(string), "Razlog iskljucenja: %s ", (result));
SendClientMessage(giveplayerid, COLOR_NICERED, string);
BanLog(string);
format(string,sizeof(string), "Datum i vrijeme bana: Dana: %d/%d/%d, Sati: %d:%d:%d | Vasa IP Adresa je: %s ",d,m,y,h,mi,s, playersip);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
SendClientMessage(giveplayerid,COLOR_WHITE, "Sa ovim banom, vas korisnicki racun je suspendiran na neograniceno!");
SendClientMessage(giveplayerid,COLOR_ORANGE, "Ukoliko mislis da je doslo do greske slikaj ovo(f8) i zatrazi unban na forumu!");
SendClientMessage(giveplayerid,COLOR_NICERED, "____________________________________________________________________________________");
format(string, sizeof(string), "Ban | {FFFFFF}%s | Admin: %s | Razlog: "COL_RED"%s {FFFFFF}(Dana: %d/%d/%d | Sati: %d:%d:%d)", giveplayer, sendername, (result),d,m,y,h,mi,s);
ABroadCast(NICERED,string,1);
format(string, sizeof(string), "Ban | {FFFFFF}%s | {F81414}Admin: {FFFFFF}%s", giveplayer, sendername);
SendClientMessageToAll(NICERED, string);
PlayerInfo[giveplayerid][pLocked] = 1;
Ban(giveplayerid);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}



if(strcmp(cmd, "/pm", true) == 0 || strcmp(cmd, "/pm", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(gPlayerLogged[playerid] == 0)
           {
               SendClientMessage(playerid, COLOR_GREY, "   Nisi logiran!");
               return 1;
           }
           if(PlayerInfo[playerid][pAdmin] <= 1337 || PlayerInfo[playerid][pGameSage] <= 4)
           {
                tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /pm [ID/Dio Imena] [text]");
               return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                  if(giveplayerid == playerid)
                  {
                     SendClientMessage(playerid, COLOR_GRAD2, "Nemozes sam sebi poslati PM!");
                     return 1;
                  }
                  new length = strlen(cmdtext);
                  while ((idx < length) && (cmdtext[idx] <= ' '))
                  {
                     idx++;
                  }
                  new offset = idx;
                  new result[300];
                  while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                  {
                     result[idx - offset] = cmdtext[idx];
                     idx++;
                  }
                  result[idx - offset] = EOS;
                  if(!strlen(result))
                  {
                     SendClientMessage(playerid, COLOR_GRAD2, "Koristi: (/pm) [ID/Dio Imena] [text]");
                     return 1;
                  }
                  if(PlayerInfo[playerid][pGameSage] >= 1)
                  {
                  format(string, sizeof(string), "{00FF00}GameMaster {00FF00}%s: %s", sendername, result);
                  SendClientMessage(giveplayerid, Gmchat, string);
                  format(string, sizeof(string), "|GM|%s[%d] > %s[%d] : {FFFFFF}%s",sendername, playerid, giveplayer, giveplayerid, result);
                  SendGameMasterMessage(PM., string);
                  }

                  else if(PlayerInfo[playerid][pAdmin] == 1 || PlayerInfo[playerid][pAdmin] == 2 || PlayerInfo[playerid][pAdmin] == 3 || PlayerInfo[playerid][pAdmin] == 4 || PlayerInfo[playerid][pAdmin] == 5 || PlayerInfo[playerid][pAdmin] == 1337)
                  {
                  format(string, sizeof(string), "Administrator %s: %s", sendername, result);
                  SendClientMessage(giveplayerid, Achat, string);
                  format(string, sizeof(string), "|A|%s[%d] > %s[%d] : {FFFFFF}%s",sendername, playerid, giveplayer, giveplayerid, result);
                  SendGameMasterMessage(PM., string);
                  }

                  if(PlayerInfo[playerid][pAdmin] >= 1338)
                  {
                  format(string, sizeof(string), "Head Administrator %s: %s", sendername, result);
                  SendClientMessage(giveplayerid, Achat, string);
                  format(string, sizeof(string), "|A|%s[%d] > %s[%d] : {FFFFFF}%s",sendername, playerid, giveplayer, giveplayerid, result);
                  SendGameMasterMessage(PM., string);
                  }

                  return 1;
               }
            }
            else
            {
               format(string, sizeof(string), "   %d nije na serveru.", giveplayerid);
               SendClientMessage(playerid, COLOR_GRAD1, string);
            }
         }
         else
         {
             SendClientMessage(playerid, COLOR_GRAD1, " Nisi GM!!");
             return 1;
         }
      }
      return 1;
   }



    if(strcmp(cmd, "/kick", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /kick [ID Igraca/Dio Imena] [razlog]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameSage] >=1)
{
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /kick [ID Igraca/Dio Imena] [razlog]");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "Kick: %s je kikovan od: %s, razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
KickLog(string);
format(string, sizeof(string), "("COL_RED"Kick{FFFFFF}!) "COL_RED"%s | {FFFFFF}(A | GS) "COL_RED"%s {FFFFFF}| Razlog: "COL_RED"%s {FFFFFF}(%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
ABroadCast(WHITE,string,1);
format(string, sizeof(string), "("COL_RED"Kick{FFFFFF}!) "COL_RED"%s | {FFFFFF}(A | GS) "COL_RED"%s | {FFFFFF}Razlog: "COL_RED"%s", giveplayer, sendername, (result));
SendClientMessage(playerid, WHITE, string);
Kick(giveplayerid);
return 1;
}
}
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}



Evo skonto sam : mora bit /bann /kickk /pmm , gdje da nadjem te komande /Ban i to da ih izbrisem da moje budu /ban /kick /pm itd ?



Vegas.

Citat: Mrki 789 poslato Februar 13, 2012, 11:08:30 PRE PODNE
Evo skonto sam : mora bit /bann /kickk /pmm , gdje da nadjem te komande /Ban i to da ih izbrisem da moje budu /ban /kick /pm itd ?
Ma čovječe odeš na prvobitnu komandu, i napraviš kako je želiš da bude, a ako već praviš svoje, zavedi ih pod /ah /gmh itd...

Citat: Vegas. poslato Februar 13, 2012, 15:20:38 POSLE PODNE
Citat: Mrki 789 poslato Februar 13, 2012, 11:08:30 PRE PODNE
Evo skonto sam : mora bit /bann /kickk /pmm , gdje da nadjem te komande /Ban i to da ih izbrisem da moje budu /ban /kick /pm itd ?
Ma čovječe odeš na prvobitnu komandu, i napraviš kako je želiš da bude, a ako već praviš svoje, zavedi ih pod /ah /gmh itd...

pogledaj u GMu da li imas vec /ban ili ako koristis FS base


Pa isbrisi iz server.cfg base dje ti pise i problem rijesen :D


Citat: [BL]...Haske... poslato Februar 13, 2012, 19:04:49 POSLE PODNE
pa da neka izbrise iz foldera filterscripts i iz server.cfg filterscripts base.. samo base obrise i res server i radi mu..


Pa koja je onda korist sto obrise...


Decko je reko da ne koristi FSove ...