Menu

Show posts

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 Menu

Messages - MEGAMIND

#616
Minor updates is current game mode



#617
Quote from: umar4911 on Sep 11, 2018, 09:47 AMInstead of using if(FindPlayer(player)) use if(player)
function 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.
i did that but now anik system wont work
#618
is there a method to do it like this?

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
#619
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)

thanks that worked out but i cannot see my gui labels on screen now , instead it shows aniks registeration screen
#620
hello there first of all nice work umar, secondly marine force if u implement the system correctly it works perfect (PS Umar there were minor bugs even a kid can find it :D). Tested on Blank server works perfect!
ok
so i have a slight issue here too

here my code of snippet ive been using for other purpose
function SendDataToClient( player, integer, string )
{
 
 if ( FindPlayer( player ) )
 {

 Stream.StartWrite( );
 Stream.WriteInt( integer );
 if ( string != null ) Stream.WriteString( string );
 Stream.SendStream( FindPlayer( player ) );
 }

}

and heres urs

function SendDataToClient(player, integer, string)
{
 Stream.StartWrite();
 Stream.WriteInt(integer);
 if (string != null) Stream.WriteString(string);
 Stream.SendStream(player);
}

the difference in both is

Stream.SendStream( FindPlayer( player ) );
  Stream.SendStream(player);

and

if ( FindPlayer( player ) )
 {

}

so i have tried implementing it but it doesnt seem to work just gives me errors out on console in these code saying invalid argument FindPlayer something like that so what would be the alternative to that code ty.

this is what comes up


#622
Servers / Re: [0.4]Top Down City Server
Sep 10, 2018, 10:23 AM
10/09/2018
TDCS VCMP New Game Mode "GTB" (Grab The Briefcase)
has launched
#623
Support / Re: Ann/MSG in a world
Sep 09, 2018, 07:12 PM
Quote from: Takanaue on Sep 09, 2018, 07:07 PM
Quote from: MEGAMIND on Sep 09, 2018, 07:04 PM
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 );
}

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
any other example pls
#624
Support / Re: Ann/MSG in a world
Sep 09, 2018, 07:04 PM
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 );
}

Message is required not messageplayer,

Like it has announed sething to all only in world 2 to everyone but should not announce in world 1
#625
Support / Ann/MSG in a world
Sep 09, 2018, 06:42 PM
Hi everyone does anyone know how to announe or message everyone in a specific world for example

I want to announce or display a message to everyone in world 2, but it should not be displayed in world 1
#627
A suggestion, make it using if & else statement for other player to make it understandable instead if switch case
#628
Quote from: =RK=MarineForce on Sep 04, 2018, 06:52 PMdid it can be shell.exec
lel stay away from this , u dont have any idea what it does, btw locking topic as it was solved
#629
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