Author Topic: Can You Fix !heal cmd i have made it!!?  (Read 10048 times)

0 Members and 1 Guest are viewing this topic.

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #15 on: December 19, 2012, 06:37:09 pm »
Ok i give to you the command :p

 [pawn]  else if(strcmp(cmdtext, "health", true) == 0) {
       if(PlayerToPoint(30, playerid,-819.74688, 1135.71984, 12.28209) || PlayerToPoint(25, playerid,-117.97110, -978.80822, 10.71902) || PlayerToPoint(8, playerid,-851.71875, -78.65664, 11.55582)){
           new Dinero = GetPlayerMoney(playerid);
             if(Dinero >= 5000) {
           SendClientMessage(playerid,COLOR_YELLOW,"You are healthy");
           SetPlayerMoney(playerid,GetPlayerMoney(playerid) - 5000);
                DecPlayerHandCash(playerid,5000);
          
          }
           if(Dinero < 4999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Need more money to health,  you need $ 5000");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Need to be in any hospital or the drugs store");
           }
       return 1;
   }  [/pawn]
« Last Edit: December 21, 2012, 05:31:04 pm by aledark24 »
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline heekz.shadow

  • LU testers
  • Made Man
  • *
  • Posts: 249
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #16 on: December 21, 2012, 11:06:03 am »
If the player has 4990,4991,4992,4993,4994,4995,4996,4997,4998,4999 money, nothing happens.
Code: [Select]
[20:23] <habi> later only i heard that lu chatbox is customizable. On my first visit, it appeared ugly.
[20:23] <habi> May be that also be the reason why lu has no players

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #17 on: December 21, 2012, 05:32:58 pm »
If the player has 4990,4991,4992,4993,4994,4995,4996,4997,4998,4999 money, nothing happens.
now is fine if cash 4999
happy?
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline Rey

  • Street Thug
  • *
  • Posts: 12
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #18 on: December 28, 2012, 12:25:30 am »
Thanks alot... i will try this.. Thanks aledark :) i must say thanks for getting what i need :)

Offline shaheersa

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #19 on: February 08, 2013, 08:13:34 am »
I saw the error, just copy this script and it will be fixed
One Error-----------> Unfriend Symbol  >Cost<  in last line (if else)
Can u plz fix it?
[pawn]else if ( strcmp( cmd, "!heal", true ) == 0 )
   {
      new Float:Health; GetPlayerHealth( playerid, Health );
      if ( strcmp( GetPlayerLocation( playerid ), "Hospital-Vice-Point-Vice-City-Beach", true ) == 1 ) SendClientMessage( playerid, COLOR_GREEN, "Pm>>>Go To Drug Store For Health." );
        else if ( Health >= 100 ) SendClientMessage( playerid, COLOR_GREEN, "Pm>>>You are healthy." );
        else if ( GetPlayerHandCash( gPlayers[ playerid ] ) < 5000 ) SendClientMessage( playerid, COLOR_GREEN, "You Don't Have Enough Cash" );//The error was here
      else
  {
         SetPlayerHealth( playerid, 100.0 );
         DecPlayerHandCash( playerid, 5000 );
         SetTimer( "HealthTimer",5000,1);
            SendClientMessage( playerid, COLOR_GREEN, "Successfully Healed." );
      }
      return 1;
      }
[/pawn]

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #20 on: February 08, 2013, 03:14:45 pm »
begin
[pawn]new Medic[MAX_PLAYERS];[/pawn]
cmd
[pawn]    else if ( strcmp( cmd, "!heal", true ) == 0 )
   {
      new Float:Health; GetPlayerHealth( playerid, Health );
        if ( Health >= 100 ) SendClientMessage( playerid, COLOR_YELLOW, ">> Error: You are healthy." );
      else
      {
     if(CheckMoney(playerid, 500))
             {
          TogglePlayerControllable(playerid,0);
          SetTimer("healing", 5000, false);
          DecPlayerHandCash(playerid,200);
          GameTextForPlayer(playerid, "Healing");
      Medic[playerid] = 1;
      }
      }
      return 1;
      }[/pawn]
stock
[pawn]public healing() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(Medic == 1) {
TogglePlayerControllable(i, 1);
SetPlayerHealth( i, 100.0 );
SendClientMessage( i, COLOR_YELLOW, ">> You have been healed!" );
             }
           }
         }
       }[/pawn]
public
[pawn]stock CheckMoney(playerid, money)
{
     if(IsPlayerConnected(playerid))
     {
    new b[64];
    new xx;
    xx = money - (GetPlayerMoney(playerid));
    if(GetPlayerMoney(playerid) >= money)
    {
    return 1;
    }
    else
    {
    format(b,sizeof(b)," You do not have enough money! left %d$",xx);
    SendClientMessage(playerid, RED, b);
    return 0;
    }
  }
      return 0;
}[/pawn]
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #21 on: February 10, 2013, 06:29:43 am »
I still doubt your script will work like it should be... Although it solves the player ID part, it still won't solve the timing part. I wanted to explain to you what will happen when your script is in action, but I don't have much time.
I'm beginning to feel like a Lag God, Lag God