14.08.2011, 10:51
For the first look at the OnPlayerDeath callback and SetPlayerWantedLevel function. In the callback, you would need to set the wanted level of the 'killerid' parameter.
For the second, you would need to use the SendRconCommand with the option of 'gmx', which is a server restart. Players are automatically re-connected when the restart is complete:
pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
SetPlayerWantedLevel( killerid, 6 );
return 1;
}
pawn Код:
COMMAND:gmx( playerid, params[ ] )
{
if( !IsPlayerAdmin( playerid ) ) return 0; // If not an admin, don't perform the command
SendRconCommand( "gmx" );
return 1;
}
// Alternatively, you could just use the default rcon command, /rcon gmx