SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 21/12/2009, 11:46 AM   #1
jaksimaksi
Huge Clucker
 
Join Date: Nov 2009
Posts: 200
Reputation: 0
Default help!

Hi i'm making clan wars mod, i need to create that when players will be in lobby, kill list dont showing deaths/kills and when base starting kill list is showing. can someone can say how to do it?
jaksimaksi is offline  
Old 21/12/2009, 02:03 PM   #2
M4S7ERMIND
Huge Clucker
 
Join Date: Jun 2009
Location: Russia
Posts: 237
Reputation: 0
Default Re: help!

I got curious, ran some tests and this is what I made:

This will hide kill/death list for all players as long as your server is not full.
Add this where you want it to get hidden.
pawn Code:
for(new i; i < MAX_PLAYERS; i++)
{
  if(!IsPlayerConnected(i))
  {
    for(new j; j < 5; j++)
    {
      SendDeathMessage(i, i, 1);
    }
    break;
  }
}

Edit: replace
Code:
for(new i; i < MAX_PLAYERS; i++)
to
Code:
for(new i = MAX_PLAYERS-1; i >= 0; i--)
M4S7ERMIND is offline  
Old 21/12/2009, 02:16 PM   #3
LarzI
High-roller
 
LarzI's Avatar
 
Join Date: Apr 2007
Location: Norway
Posts: 2,628
Reputation: 136
Default Re: help!

pawn Code:
SendDeathMessage(i, i, 1);

should be

pawn Code:
SendDeathMessage(i, j, 1);

?
__________________


NEW: [FS] Simple Cellphones

if( strfind( title, "REP", true ) != -1 )
{________________________________________
Sigh();__________________________
}________________________________________


LarzI is offline  
Old 21/12/2009, 02:18 PM   #4
M4S7ERMIND
Huge Clucker
 
Join Date: Jun 2009
Location: Russia
Posts: 237
Reputation: 0
Default Re: help!

Quote:
Originally Posted by lrZ^ aka LarzI
pawn Code:
SendDeathMessage(i, i, 1);

should be

pawn Code:
SendDeathMessage(i, j, 1);

?
Nope, it should be SendDeathMessage(i, i, 1);
Non-connected player kills himself, it will send empty deathmessage
M4S7ERMIND is offline  
Old 21/12/2009, 02:20 PM   #5
LarzI
High-roller
 
LarzI's Avatar
 
Join Date: Apr 2007
Location: Norway
Posts: 2,628
Reputation: 136
Default Re: help!

Oh, ok :P
My bad...
But what is the second for loop good for?
You don't use 'j' anywhere...
__________________


NEW: [FS] Simple Cellphones

if( strfind( title, "REP", true ) != -1 )
{________________________________________
Sigh();__________________________
}________________________________________


LarzI is offline  
Old 21/12/2009, 02:26 PM   #6
M4S7ERMIND
Huge Clucker
 
Join Date: Jun 2009
Location: Russia
Posts: 237
Reputation: 0
Default Re: help!

it could as well be

Code:
SendDeathMessage(i, i, 1);
SendDeathMessage(i, i, 1);
SendDeathMessage(i, i, 1);
SendDeathMessage(i, i, 1);
SendDeathMessage(i, i, 1);
the other loop sends deathmessage 5 times
M4S7ERMIND is offline  
Old 21/12/2009, 02:41 PM   #7
LarzI
High-roller
 
LarzI's Avatar
 
Join Date: Apr 2007
Location: Norway
Posts: 2,628
Reputation: 136
Default Re: help!

oh, lol. my bad x)))
__________________


NEW: [FS] Simple Cellphones

if( strfind( title, "REP", true ) != -1 )
{________________________________________
Sigh();__________________________
}________________________________________


LarzI is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:24 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.