[Pomoc] Komande /unban,/unbanip,/banip,/IP

Započeo Mirnas_Tajic, Avgust 25, 2011, 20:05:27 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Mirnas_Tajic

Skripta koju koristim:WorldWild DeathMatch
Detaljan opis problema:Ocu da ubacim komandu /unban,/banip,/unbanip,/ip
Dio skripte:Evo nasao sam komandu /unban al mi izbaci Errore:
          if (strcmp(cmd, "/unban", true)==0)
{
    if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=3)
    {
         tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
{
        SendClientMessage(playerid, COLOR_WHITE, "Koristi: /unban [Ime_Prezime]");
            return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(giveplayer));
format(string, 256, "|A| %s je unbanao %s", sendername, tmp);
ABroadCast(COLOR_LIGHTRED,string,1);
format(string, 256, "|A| %s je unbanao %s", sendername, tmp);
printf(string);
format(string,sizeof(string),"%s.ini",tmp);
fremove(string);
SendClientMessage(playerid, COLOR_WHITE, "Igrac odbanan");
SendRconCommand(string);
SendRconCommand("reloadbans");
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
}
return 1;
}


                                   if(strcmp(cmd,"/unbanip",true)==0)
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
      tmp = strtok(cmdtext,idx);
    if(!strlen(tmp))
    {
        SendClientMessage(playerid,COLOR_GRAD1,"Koristi: /unbanip [players ip]");
        return 1;
    }

format(string,sizeof(string),"unbanip %s",tmp);
SendRconCommand(string);
SendRconCommand("reloadbans");
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "[ADMIN]: %s has unbanned IP [%s].", sendername,tmp);
ABroadCast(COLOR_YELLOW,string, 5);
format(string, sizeof(string), "* Administrator %s Has Unbanned IP [%s]", sendername,tmp);
SendClientMessageToAll(COLOR_NICERED,string);
format(string, sizeof(string), "* Successfuly Unbanned [%s] IP", tmp);
SendClientMessage(playerid,TEAM_GROVE_COLOR,string);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Unbanned IP [%s]",d,m,y,h,mi,s,sendername,tmp);
}
return 1;
}


PS: Ako imate komande koje su ispravne dajte mii molim vas Ali ovo je za DM Server i imaju 3 admin lvl-a a to su: 1,2,3 pa hvala
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Poslednja Izmena: Avgust 25, 2011, 21:35:26 POSLE PODNE od Mirnas_Tajic

koji erori i daj retke..

Ps. ako imas 3 adm lvl-a

onda ti mora bit ovako:
if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=3)
Street's Creed

Street's Creed gaming zajednica se vraća.
Forum: www.streets-creed.info
IP: 213.149.60.34:7774

Mirnas_Tajic

Skontao sam stavio sam : if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=3)

Al bude 6 errora a to su: C:\DOCUME~1\Name\LOCALS~1\Temp\Rar$DI41.744\bwwdm.pwn(5374) : error 010: invalid function or declaration
C:\DOCUME~1\Name\LOCALS~1\Temp\Rar$DI41.744\bwwdm.pwn(5376) : error 010: invalid function or declaration
C:\DOCUME~1\Name\LOCALS~1\Temp\Rar$DI41.744\bwwdm.pwn(5379) : error 010: invalid function or declaration
C:\DOCUME~1\Name\LOCALS~1\Temp\Rar$DI41.744\bwwdm.pwn(5382) : error 010: invalid function or declaration
C:\DOCUME~1\Name\LOCALS~1\Temp\Rar$DI41.744\bwwdm.pwn(5387) : error 021: symbol already defined: "ABroadCast"
C:\DOCUME~1\Name\LOCALS~1\Temp\Rar$DI41.744\bwwdm.pwn(5398) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.

Ovaj eror je zato jer ti je dva put definirano ili se ne koristi...

C:\DOCUME~1\Name\LOCALS~1\Temp\Rar$DI41.744\bwwdm.pwn(5387) : error 021: symbol already defined: "ABroadCast"

Ako zelis uplodaj mi mod ja ti serdim te sve erore :)

posalji mi na pm..
Street's Creed

Street's Creed gaming zajednica se vraća.
Forum: www.streets-creed.info
IP: 213.149.60.34:7774

Mirnas_Tajic

Vako ocu da ubacim komandu /unban ali mi izbaci ove errore pa dal je moguc epreko komande /ban napravit komandu /unban? evo komanda /ban

            if(strcmp(cmd, "/ban", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, WHITE, "USAGE: /ban [ID] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] == 1 || PlayerInfo[playerid][pAdmin] == 2 || PlayerInfo[playerid][pAdmin] == 3)
{
    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[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, WHITE, "KORISTI: /ban [ID] [reason]");
return 1;
}
format(string, sizeof(string), "[ADMCMD] %s Banan si %s, Razlog: %s", giveplayer, sendername, (result));
SendClientMessageToAll(RED, string);
PlayerInfo[giveplayerid][pLocked] = 1;
Ban(giveplayerid);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), "   %d nije online.", giveplayerid);
SendClientMessage(playerid, WHITE, string);
}
}
return 1;
}

pogledaj kako si ovo stavio :
if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=3)
ovako treba :
if((IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >=3)
Poslednja Izmena: Avgust 25, 2011, 23:32:34 POSLE PODNE od [TG]$--L84S--$

Mirnas_Tajic