Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: MatheuS on July 20, 2012, 04:57:14 am

Title: I made new codes hope you like
Post by: MatheuS on July 20, 2012, 04:57:14 am
[pawn]else if ( strcmp( cmd, "!cop", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
      if ( !strlen( tmp ) )
      {
         format( szMsg, sizeof( szMsg ), "%s:precisa de policia em %s", gPlayers[ playerid ], GetPlayerLocation( playerid ) );
         SendClientMessageToAll( BLUE, szMsg );
      }
      return 1;
   }
   else if ( strcmp( cmd, "!paramedic", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
      if ( !strlen( tmp ) )
      {
         format( szMsg, sizeof( szMsg ), "%s:precisa de um paramedico em %s", gPlayers[ playerid ], GetPlayerLocation( playerid ) );
         SendClientMessageToAll( BLUE, szMsg );
      }
      return 1;
   }
    else if ( strcmp( cmd, "!tax", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
      if ( !strlen( tmp ) )
      {
         format( szMsg, sizeof( szMsg ), "%s:precisa de um taxi em %s", gPlayers[ playerid ], GetPlayerLocation( playerid ) );
         SendClientMessageToAll( BLUE, szMsg );
      }
      return 1;
   }[/pawn]
Title: Re: I made new codes hope you like
Post by: DilsonTB on July 20, 2012, 06:40:50 am
Well man, is a excelent beginner code, but our responsability is to teach you, so i will start with 1 of your example

[pawn]else if ( strcmp( cmd, "!cop", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
      if ( !strlen( tmp ) )
      {
         format( szMsg, sizeof( szMsg ), "%s:precisa de policia em %s", gPlayers[ playerid ], GetPlayerLocation( playerid ) );
         SendClientMessageToAll( BLUE, szMsg );
      }[/pawn]
--------------------------------------------------------------
      tmp = strtok( cmdtext, idx );                 | This part isnt needed cuz it is saying that the player need to use this cmd
      if ( !strlen( tmp ) )                                 | !cop + player or another thing that you want like !cop jose
--------------------------------------------------------------

- All players will be able to use all of those cmds at the same time.
- No one will know what kind of job that player is.

YOU CAN SET DIFERENTS COLORS TO EACH TYPE OF JOB, LIKE YELLOW TO TAXI, BLUE TO COPS, THAT WILL REPRESENT EACH JOB.

Take care :D
Title: Re: I made new codes hope you like
Post by: MatheuS on July 20, 2012, 07:12:04 pm
 :D thanks guy won and I'm still newbie thanks a lot thanks  ;)
Title: Re: I made new codes hope you like
Post by: LisKa on July 20, 2012, 07:42:23 pm
:D thanks guy won and I'm still newbie thanks a lot thanks  ;)
Remember, whenever you're making a command, be sure, it is clean and don't make it so complicated.