[HELP] Death Window
#1

hey .. how can i make Filter Script for admin /cleardeathwindow - /cdw ?? i want make script cleardeathwindow ... hope can help me
Reply
#2

I haven't tested this but it should work. I'm not sure if you can clear the icons but this should clear the names. I'm also not sure how many death messages are shown i have looped 10 times but it may not need that many.

pawn Code:
COMMAND:cdw(playerid, params[])
{
    for(new i; i < 10; ++i)
    {
        SendDeathMessage( INVALID_PLAYER_ID, INVALID_PLAYER_ID, 200 )//connection icon
    }
    return 1;
}
If you don't use YCMD or ZCMD paste the loop into your command.
Reply
#3

if using this ??

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
Reply
#4

Rcon only. Needs editing to be user friendly.
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/cdw", cmdtext))
    {
        if( IsPlayerAdmin( playerid ) )//swap this for your admin variable if you have one
        {
            for(new i; i < 10; ++i)
            {
                SendDeathMessage( INVALID_PLAYER_ID, INVALID_PLAYER_ID, 200 );//connection icon
            }
            return 1;
        }
    }
    return 0;
}
EDIT: Some good advice: learn to use a better command processor. Look for y_commands or zcmd. With the OnPlayerCommandText/strcmp method the more commands you add the slower they will be. Each command you add will be slightly slower than the last one. (or take longer to get to might be more accurate)
Reply
#5

ok .. tyvm Bro !!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)