PDA

View Full Version : [HELP] Death Window


Eiy Mard
14/06/2012, 03:04 PM
hey .. how can i make Filter Script for admin /cleardeathwindow - /cdw ?? i want make script cleardeathwindow ... hope can help me :D

iggy1
14/06/2012, 03:10 PM
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.

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.

Eiy Mard
14/06/2012, 03:18 PM
if using this ??

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

iggy1
14/06/2012, 03:24 PM
Rcon only. Needs editing to be user friendly.
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)

Eiy Mard
14/06/2012, 03:39 PM
ok .. tyvm Bro !! :)