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

0 Members and 1 Guest are viewing this topic.

Offline Rey

  • Street Thug
  • *
  • Posts: 12
    • View Profile
Can You Fix !heal cmd i have made it!!?
« on: December 04, 2012, 01:53:21 pm »
One Error-----------> Unfriend Symbol  >Cost<  in last line (if else)
Can u plz fix it?
[pawn][/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 ] ) < cost ) SendClientMessage( playerid, COLOR_GREEN, "You Don't Have Enough Cash" );
      else
  {
         SetPlayerHealth( playerid, 100.0 );
         DecPlayerHandCash( playerid, 5000 );
         SetTimer( "HealthTimer",5000,1);
            SendClientMessage( playerid, COLOR_GREEN, "Successfully Healed." );
      }
      return 1;
      }

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #1 on: December 04, 2012, 03:22:18 pm »
What about to put GetPlayerMoney?


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline Rey

  • Street Thug
  • *
  • Posts: 12
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #2 on: December 04, 2012, 03:24:59 pm »
In my cmd [Symbol] it is DecPlayerHandCash u can see it i dont know if i have placed it at wrong place but working if u have 5000 cash....

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #3 on: December 05, 2012, 05:17:29 am »
This script will never work..

Quote from: Rey
SetTimer( "HealthTimer",5000,1);
I'm beginning to feel like a Lag God, Lag God

Offline Rey

  • Street Thug
  • *
  • Posts: 12
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #4 on: December 05, 2012, 12:53:17 pm »
This script will never work..

Quote from: Rey
SetTimer( "HealthTimer",5000,1);
Okey i know this but one day it will and i wanted to fix last line of [if else] if u can do it.?

Offline Rey

  • Street Thug
  • *
  • Posts: 12
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #5 on: December 15, 2012, 12:29:19 pm »
Player is healed but not sending ClientMessage when they dont have needed money PLz Fix it.....! i just need help

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #6 on: December 15, 2012, 12:35:41 pm »
try to set a value for "cash"

new cash = GetPlayerMoney(playerid);
if(cash < 500)
{
    blablabla;
}


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #7 on: December 16, 2012, 06:07:26 pm »
Just remove the fucking timer from your script and it will work like a charm..
I'm beginning to feel like a Lag God, Lag God

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 #8 on: December 16, 2012, 06:18:39 pm »
[pawn]else if ( strcmp( cmd, "!heal", true ) == 0 )
   {
      new Float:Health; GetPlayerHealth( playerid, Health );
      if ( strcmp( GetPlayerLocation( playerid ), "Hospital-Vice-Point-Vice-City-Beach", false ) == 0 ) SendClientMessage( playerid, COLOR_GREEN, "You have to be at the hospital." );
        else if ( Health >= 100 ) SendClientMessage( playerid, COLOR_GREEN, "Error: You are healthy." );
      else
      {
         SetPlayerHealth( playerid, 100.0 );
            SendClientMessage( playerid, COLOR_GREEN, "You have been healed." );
      }
      return 1;
   }[/pawn]
use this i am using this
this is good to heal
no money cost
healed in 0 sec
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 #9 on: December 17, 2012, 04:54:10 am »
use this i am using this
this is good to heal
no money cost
healed in 0 sec
Yep this or you could use stormeus way of timer which is much complicating than it seems..
I'm beginning to feel like a Lag God, Lag God

Offline Rey

  • Street Thug
  • *
  • Posts: 12
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #10 on: December 17, 2012, 09:18:52 pm »
Just remove the fucking timer from your script and it will work like a charm..

Cool Down, you need to Fix needed Script, and Timer has to work and will work....Thanks by the way.!

Offline BadCivil

  • Street Thug
  • *
  • Posts: 22
  • VCMP,SAMP - Mapper - Scripter
    • View Profile
    • [HuN].:Magyar Xmas Freeroam:.Szerver
Re: Can You Fix !heal cmd i have made it!!?
« Reply #11 on: December 18, 2012, 12:42:31 am »
mrockxkingbutt in your system is a error:

C:\Documents and Settings\XPPRESP3\Desktop\[MBF]Szerver\gamemodes\mode.pwn(648) : error 017: undefined symbol "GetPlayerLocation"

WHAT IS THE PROBLEM? :)
Hy all!

My web is:www.mxmasfreeroam.atw.hu Please register! :)
My YouTube account:http://www.youtube.com/user/BlackScripter1999?feature=mhee Please Subscribe! :)

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: Can You Fix !heal cmd i have made it!!?
« Reply #12 on: December 18, 2012, 12:47:56 am »
mrockxkingbutt in your system is a error:

C:\Documents and Settings\XPPRESP3\Desktop\[MBF]Szerver\gamemodes\mode.pwn(648) : error 017: undefined symbol "GetPlayerLocation"

WHAT IS THE PROBLEM? :)

You need "GetPlayerLocation" function.

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline BadCivil

  • Street Thug
  • *
  • Posts: 22
  • VCMP,SAMP - Mapper - Scripter
    • View Profile
    • [HuN].:Magyar Xmas Freeroam:.Szerver
Re: Can You Fix !heal cmd i have made it!!?
« Reply #13 on: December 18, 2012, 12:49:21 am »
it's in that?
Hy all!

My web is:www.mxmasfreeroam.atw.hu Please register! :)
My YouTube account:http://www.youtube.com/user/BlackScripter1999?feature=mhee Please Subscribe! :)

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Can You Fix !heal cmd i have made it!!?
« Reply #14 on: December 18, 2012, 06:22:31 am »
it's in that?
mrockxkingbutt uses GUPS.. If your not using GUPS, remove this line:
[pawn]if ( strcmp( GetPlayerLocation( playerid ), "Hospital-Vice-Point-Vice-City-Beach", false ) == 0 ) SendClientMessage( playerid, COLOR_GREEN, "You have to be at the hospital." );[/pawn]
I'm beginning to feel like a Lag God, Lag God