[Pomoc]Chat
971
pregleda
5
postova
15. Okt. 2010.
Cek jer ti hoces da igrac nemoze da pise ni na jedan chat kad ti hoces? to ti je onda cmd mute?
if(strcmp(cmd, "/mute", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid/PartOfName]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
if(playa != playerid && Untouchable) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!");
if(PlayerInfo == 0)
{
PlayerInfo = 1;
format(string, sizeof(string), ": %s Has Muted %s (%d).",sendername,giveplayer,playa);
ABroadCast(COLOR_LIGHTRED,string, 5);
GameTextForPlayer(playa, "~r~Muted by An Administrator!",4000,3);
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 Muted %s",d,m,y,h,mi,s,sendername,giveplayer);
MuteLog(string);
}
else
{
PlayerInfo = 0;
format(string, sizeof(string), ": %s Has Un-Muted %s (%d).",sendername,giveplayer,playa);
ABroadCast(COLOR_LIGHTRED,string, 5);
GameTextForPlayer(playa, "~g~Unmuted by An Administrator!",4000,3);
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 UnMuted %s",d,m,y,h,mi,s,sendername,giveplayer);
MuteLog(string);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "** you are not authorized to use that command!");
}
}
return 1;
}
if(strcmp(cmd, "/mute", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid/PartOfName]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
if(playa != playerid && Untouchable) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!");
if(PlayerInfo == 0)
{
PlayerInfo = 1;
format(string, sizeof(string), ": %s Has Muted %s (%d).",sendername,giveplayer,playa);
ABroadCast(COLOR_LIGHTRED,string, 5);
GameTextForPlayer(playa, "~r~Muted by An Administrator!",4000,3);
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 Muted %s",d,m,y,h,mi,s,sendername,giveplayer);
MuteLog(string);
}
else
{
PlayerInfo = 0;
format(string, sizeof(string), ": %s Has Un-Muted %s (%d).",sendername,giveplayer,playa);
ABroadCast(COLOR_LIGHTRED,string, 5);
GameTextForPlayer(playa, "~g~Unmuted by An Administrator!",4000,3);
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 UnMuted %s",d,m,y,h,mi,s,sendername,giveplayer);
MuteLog(string);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "** you are not authorized to use that command!");
}
}
return 1;
}
15. Okt. 2010.
forward ClearChat(playerid);
public ClearChat(playerid)
{
if (IsPlayerConnected(playerid))
{
for(new i=0; i<30; i++)
{
SendClientMessage(playerid, COLOR_WHITE, " ");
}
}
return 1;
}
public ClearChat(playerid)
{
if (IsPlayerConnected(playerid))
{
for(new i=0; i<30; i++)
{
SendClientMessage(playerid, COLOR_WHITE, " ");
}
}
return 1;
}
15. Okt. 2010.
Quote from October 15, 2010, 11:23 am:
forward ClearChat(playerid);
public ClearChat(playerid)
{
if (IsPlayerConnected(playerid))
{
for(new i=0; i<30; i++)
{
SendClientMessage(playerid, COLOR_WHITE, " ");
}
}
return 1;
}
public ClearChat(playerid)
{
if (IsPlayerConnected(playerid))
{
for(new i=0; i<30; i++)
{
SendClientMessage(playerid, COLOR_WHITE, " ");
}
}
return 1;
}
jest ali moze svak ziv pisat onda
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava