Help please [KILLFEED]
#1

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..
Reply
#2

Код:
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.
Reply
#3

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++)
Reply
#4

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?
Reply
#5

All my options + the reaction of iggy1?
Reply
#6

yep, didnt work..
Reply
#7

No one else knows what to do here? I would really like this to work!
Reply
#8

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)