Skripta koju koristim:Ravens RP
Detaljan opis problema:Kad kucam /cc servermi se restarta
Dio skripte:if(strcmp(cmd, "/cc", true) == 0) // By CuervO_NegrO
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command.");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
ClearChatbox(i, 100);
SendClientMessageToAll(COLOR_LIGHTBLUE, "%s je Ocistio Chat", sendername);
SendClientMessageToAll(COLOR_ORANGE, "WWW.Balkan-Nations.ForumHr.Com");
format(string, sizeof(string), "[ADMIN]: %s has Cleared the Chat", sendername);
ABroadCast(COLOR_LIGHTRED,string, 5);
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 Has Cleared the Chat",d,m,y,h,mi,s,sendername);
ChatLog(string);
AdminLog(string);
}
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Jel u Scriptfiles imaš AdminLog i ChatLog?
if(strcmp(cmd, "/cc", true) == 0) // By CuervO_NegrO
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "Nisi u mogucnosti koristiti ovu komandu.");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
ClearChatbox(i, 100);
SendClientMessageToAll(COLOR_LIGHTBLUE, "Chat je obrisan!");
format(string, sizeof(string), "[ADMIN]: %s je obrisao Chat", sendername);
ABroadCast(COLOR_LIGHTRED,string, 5);
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 Has Cleared the Chat",d,m,y,h,mi,s,sendername);
ChatLog(string);
AdminLog(string);
}
return 1;
}
Ma imam,samo kad sam ovaj redak SendClientMessageToAll(COLOR_LIGHTBLUE, "%s je Ocistio Chat", sendername); promjenio se to pocelo desavat
evo ovako je moja
na vrh #define ClearChat(%0) for(new l; l < %0; l++) SendClientMessageToAll(-1, " ")
#define ClearChatForPlayer(%0,%1) for(new l; l < %1; l++) SendClientMessage(%0, -1, " ")
CMD:cc(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 4)
ClearChat(15);
return 1;
}
ili u CMD: if(strcmp(cmd, "/cc", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 4)
ClearChat(15);
return 1;
}
@System nevalja...
CMD:cc(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
ClearChat(100);
}
return 1;
}
ockej nisam obazirao se na to, radim u ZCMD cak ovaj CMD zaboravljam xDD
Citat: eXtreme poslato April 27, 2011, 16:24:50 POSLE PODNE
@System nevalja...
CMD:cc(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
ClearChat(100);
}
return 1;
}
a lol sta si ti napravio da brise samo adminima lvl 4 pa nadalje chat... umjesto obratno...
if(PlayerInfo[playerid][pAdmin] < 4)
Pa ako je obratno onda moze da brise i admin lvl 0 a visi admin lvl nemogu ;)
if(strcmp(cmd, "/cc",1)==0)
{
new p=GetMaxPlayers();
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid,-1,"Niste administrator lvl 4 +");
for(new i=0;i<p;i++) SendClientMessageToAll(-1," ");
SendClientMessageToAll(-1,"Administrator je obrisao chat!");
return true;
}
Evo
if(strcmp(cmd, "/cc",1)==0)
{
new p=GetMaxPlayers();
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"Niste administrator lvl 1 +");
for(new i=0;i<p;i++) SendClientMessageToAll(-1," ");
SendClientMessageToAll(-1,"%s je obrisao chat!", sendername);
SendClientMessageToAll(-1,"Balkan-Nations.ForumHr.Com");
return true;
}
Ovo mi je komanda i opet kad je upisem,server se ugasi
@Dave Di ti je format, di ti je getplayername?
Evo onda;
if(strcmp(cmd, "/cc",1)==0)
{
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid,-1,"Niste administrator lvl 4 +");
new p=GetMaxPlayers();
for(new i=0;i<p;i++) SendClientMessageToAll(-1," ");
new str[128],gp[24]; GetPlayerName(playerid,gp,24);
format(str,128,"Administrator %s je obrisao chat",gp);
SendClientMessageToAll(-1,str);
return true;
}