Help please [KILLFEED] -
Kudoz - 06.01.2013
Hey guys! I've been trying to figure this script out.. it comes from the DevilAdminSystem.
Код:
CMD:cleardeathwindow(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
for ( new i; i > 20; i++ )
{
SendDeathMessage(INVALID_PLAYER_ID, INVALID_PLAYER_ID, 255);
SendClientMessage(playerid, lightred, "[{B4B5B7}Admin{FF6347}]{B4B5B7} have cleared the Killfeed!");
}
}
else return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}You aren't authorized to use this command.");
return 1;
}
But nothing happens! only thing that works is the SendClientMessage.. but the Killfeed is not being cleared..
Re: Help please [KILLFEED] -
wouter0100 - 06.01.2013
Код:
CMD:cleardeathwindow(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
for(new i=1; i >= 20; i++)
{
SendDeathMessage(INVALID_PLAYER_ID, INVALID_PLAYER_ID, 255);
}
SendClientMessageToAll(lightred, "[{B4B5B7}Admin{FF6347}]{B4B5B7} have cleared the Killfeed!");
}
else return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}You aren't authorized to use this command.");
return 1;
}
Try this?
When this don't work try this:
Код:
CMD:cleardeathwindow(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
for(new i=1; i <= 20; i++)
{
SendDeathMessage(INVALID_PLAYER_ID, INVALID_PLAYER_ID, 255);
}
SendClientMessageToAll(lightred, "[{B4B5B7}Admin{FF6347}]{B4B5B7} have cleared the Killfeed!");
}
else return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}You aren't authorized to use this command.");
return 1;
}
And if that don't work, try to change the 255 to 200.
Re: Help please [KILLFEED] -
iggy1 - 06.01.2013
Both of your loop conditions are wrong.
pawn Код:
for(new i=1; i >= 20; i++)
Should be:
pawn Код:
for(new i=0; i < 20; i++)
Re: Help please [KILLFEED] -
Kudoz - 06.01.2013
hm, didnt work :/
EDIT: Didn't see your comment, gonna test now!
EDIT: it did not work.. any of them :/ Thanks for help anyways!
anyone else know how to fix it?
Re: Help please [KILLFEED] -
wouter0100 - 06.01.2013
All my options + the reaction of iggy1?
Re: Help please [KILLFEED] -
Kudoz - 06.01.2013
yep, didnt work..
Re: Help please [KILLFEED] -
Kudoz - 07.01.2013
No one else knows what to do here? I would really like this to work!
Re: Help please [KILLFEED] -
zSuYaNw - 07.01.2013
Trя this:
pawn Код:
CMD:cleardeathwindow(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1)
return SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}You aren't authorized to use this command."),0;
static i,p;
for(i = 0, p = GetMaxPlayers(); i != p; ++i){
SendDeathMessage(INVALID_PLAYER_ID, INVALID_PLAYER_ID, 200);
}
SendClientMessageToAll(lightred, "[{B4B5B7}Admin{FF6347}]{B4B5B7} have cleared the Killfeed!");
return 1;
}