Minor updates is current game mode







This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: umar4911 on Sep 11, 2018, 09:47 AMInstead of using if(FindPlayer(player)) use if(player)i did that but now anik system wont workfunction SendDataToClient( player, integer, string )
{
if (player )
{
Stream.StartWrite( );
Stream.WriteInt( integer );
if ( string != null ) Stream.WriteString( string );
Stream.SendStream( player );
}
}
Btw the one I made also works perfectly.
function SendDataToClient( player, integer, string )
{
if ( FindPlayer( player ) )
{
Stream.StartWrite( );
Stream.WriteInt( integer );
if ( string != null ) Stream.WriteString( string );
Stream.SendStream( FindPlayer( player ) );
//Stream.SendStream(player);
}
else
{
Stream.StartWrite( );
Stream.WriteInt( integer );
if ( string != null ) Stream.WriteString( string );
Stream.SendStream(player);
}
}
}
or can we use switch case if yes then how
Quote from: Doom_Kill3R on Sep 11, 2018, 08:29 AMMaybe because the 'player' is already a player instance and not a "player name" or a player id so you don't even need FindPlayer(player)
function SendDataToClient( player, integer, string )
{
if ( FindPlayer( player ) )
{
Stream.StartWrite( );
Stream.WriteInt( integer );
if ( string != null ) Stream.WriteString( string );
Stream.SendStream( FindPlayer( player ) );
}
}
function SendDataToClient(player, integer, string)
{
Stream.StartWrite();
Stream.WriteInt(integer);
if (string != null) Stream.WriteString(string);
Stream.SendStream(player);
}
Stream.SendStream( FindPlayer( player ) );
Stream.SendStream(player);
if ( FindPlayer( player ) )
{
}
Quote from: Takanaue on Sep 09, 2018, 07:07 PMany other example plsQuote from: MEGAMIND on Sep 09, 2018, 07:04 PMQuote from: ! on Sep 09, 2018, 07:03 PMfor( local i = 0; i < GetMaxPlayers; i++ ) {
local plr = FindPlayer(i);
if ( !plr ) continue;
if ( plr.World != 2 ) continue;
MessagePlayer( "Bla bla bla", plr );
}
Message is required not messageplayer
It's the same thing, you'll be sending message to everyone in the 2 world. The MessagePlayer was only used to identify players
Quote from: ! on Sep 09, 2018, 07:03 PMfor( local i = 0; i < GetMaxPlayers; i++ ) {
local plr = FindPlayer(i);
if ( !plr ) continue;
if ( plr.World != 2 ) continue;
MessagePlayer( "Bla bla bla", plr );
}
Quote from: Athanatos on Sep 08, 2018, 06:12 PMQuote from: Xmair on Sep 08, 2018, 05:48 PMPeople should learn using switch case then.Totally agree.
Quote from: =RK=MarineForce on Sep 04, 2018, 06:52 PMdid it can be shell.execlel stay away from this , u dont have any idea what it does, btw locking topic as it was solved
Quote from: =RK=MarineForce on Sep 04, 2018, 06:47 PMbro i m talking about Car not road ...its not about road its a guide about txd
Quote from: =RK=MarineForce on Sep 04, 2018, 04:39 PMBro how? i don't know much and i never used txt workshop.https://www.youtube.com/watch?v=TDemHTiiAXI