how to
#1

How do i add that if a player kills another player, the player who did the killing gets 6 wanted stars ?

also how can i make a command that restarts my server and all players reconnect right away?
Reply
#2

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.
pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
   SetPlayerWantedLevel( killerid, 6 );
   return 1;
}
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 Код:
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
Reply
#3

thankyoooooooooou
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)