Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: abdulfussy on January 26, 2013, 05:25:34 pm

Title: how to make heal for money?
Post by: abdulfussy on January 26, 2013, 05:25:34 pm
how to make heal for money i wnat to heal like 300$ can u tell me how to chnage this cmd[pawn]   else if ( strcmp( cmd, "!heal", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
      if ( !strlen( tmp ) )
      {
         SetPlayerHealth(playerid, 100);
         SendClientMessage(playerid, BLUE,"You Are Healthy Now.");
      }
      else
      {
         new plr = FindPlayerIDFromString( tmp );
          if ( plr != INACTIVE_PLAYER_ID )
         {
            SendClientMessage(playerid, COLOR_GREEN,"%s Is Healthy Now.",gPlayers[ plr ]);
            SendClientMessage(plr, COLOR_YELLOW,"You Are Healthy Now, Thanks To %s", gPlayers[ playerid ]);
            SetPlayerHealth(plr, 100);
         }
         else { SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" ); }
      }
      return 1;
      }[/pawn]
Title: Re: how to make heal for money?
Post by: DilsonTB on January 26, 2013, 09:12:21 pm
how to make heal for money i wnat to heal like 300$ can u tell me how to chnage this cmd[pawn]   else if ( strcmp( cmd, "!heal", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
      if ( !strlen( tmp ) )
      {
         SetPlayerHealth(playerid, 100);
// Here you can make/use a function to decrease money to the player
         SendClientMessage(playerid, BLUE,"You Are Healthy Now.");
      }
      else
      {
         new plr = FindPlayerIDFromString( tmp );
          if ( plr != INACTIVE_PLAYER_ID )
         {
            SendClientMessage(playerid, COLOR_GREEN,"%s Is Healthy Now.",gPlayers[ plr ]);
            SendClientMessage(plr, COLOR_YELLOW,"You Are Healthy Now, Thanks To %s", gPlayers[ playerid ]);
            SetPlayerHealth(plr, 100);
// Here you can make/use a function to decrease money to the player
         }
         else { SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" ); }
      }
      return 1;
      }[/pawn]

Catched it? :D
Title: Re: how to make heal for money?
Post by: abdulfussy on January 26, 2013, 09:18:15 pm
thx
Title: Re: how to make heal for money?
Post by: mrockxkingbutt on February 06, 2013, 03:31:49 pm
REMOVED, READ THIS:

http://forum.vicecitymultiplayer.com/index.php?topic=5517.0