Author Topic: Vehicle fix system TESTED {FIXED}  (Read 4537 times)

0 Members and 1 Guest are viewing this topic.

Offline rathore

  • Street Thug
  • *
  • Posts: 42
  • I am a scripter and still trying to be best
    • View Profile
    • Ultimate gamier
Vehicle fix system TESTED {FIXED}
« on: March 30, 2014, 10:17:33 pm »
Onplayertext

[pawn]else if(strcmp(cmd, "!fix", true)==0)
{
    if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You're on foot");
    else {
        new Float:vhp, vid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vid, vhp);
        if(vhp == 1000) SendClientMessage(playerid, 0xFF0000AA, "Your vehicle is okay");
        else{
        new cash = GetPlayerMoney(playerid);
        if(cash <= 299) SendClientMessage(playerid, 0xFF0000AA, "You're poor buddy");
        else {
        SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
         SetVehicleHealth(vid, 1000);
         DecPlayerHandCash( playerid, 300 );}
         }
    }
}
[/pawn]
« Last Edit: March 31, 2014, 11:57:29 am by rathore »



Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: Vehicle fix system with timer TESTED
« Reply #1 on: March 31, 2014, 04:17:01 am »
You cant make timer inside CMD Did you read this ?
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: Vehicle fix system with timer TESTED
« Reply #2 on: March 31, 2014, 04:30:42 am »
the loop for this, or am I wrong?  ???

Offline rathore

  • Street Thug
  • *
  • Posts: 42
  • I am a scripter and still trying to be best
    • View Profile
    • Ultimate gamier
Re: Vehicle fix system with timer TESTED
« Reply #3 on: March 31, 2014, 11:58:42 am »
You cant make timer inside CMD Did you read this ?

Thanks

Now fixed without timer



Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Vehicle fix system TESTED {FIXED}
« Reply #4 on: March 31, 2014, 04:16:19 pm »
[pawn]else if(strcmp(cmd, "!fix", true)==0)
{
    if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You're on foot");
    else {
        new Float:vhp, vid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vid, vhp);
        if(vhp == 1000) SendClientMessage(playerid, 0xFF0000AA, "Your vehicle is okay");
        else{
        new cash = GetPlayerMoney(playerid);
        if(cash <= 299) SendClientMessage(playerid, 0xFF0000AA, "You're poor buddy");
        else {
        SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
         SetVehicleHealth(vid, 1000);
         DecPlayerHandCash( playerid, 300 );}
         }
    }
}
[/pawn]

Did it work? Huh, amazing, I didnt know I can post working code from mobile phone


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline rathore

  • Street Thug
  • *
  • Posts: 42
  • I am a scripter and still trying to be best
    • View Profile
    • Ultimate gamier
Re: Vehicle fix system TESTED {FIXED}
« Reply #5 on: April 02, 2014, 11:37:30 pm »
[pawn]else if(strcmp(cmd, "!fix", true)==0)
{
    if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You're on foot");
    else {
        new Float:vhp, vid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vid, vhp);
        if(vhp == 1000) SendClientMessage(playerid, 0xFF0000AA, "Your vehicle is okay");
        else{
        new cash = GetPlayerMoney(playerid);
        if(cash <= 299) SendClientMessage(playerid, 0xFF0000AA, "You're poor buddy");
        else {
        SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
         SetVehicleHealth(vid, 1000);
         DecPlayerHandCash( playerid, 300 );}
         }
    }
}
[/pawn]

Did it work? Huh, amazing, I didnt know I can post working code from mobile phone

your cmd have got many bugs i fixed then it works :-)



Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Vehicle fix system TESTED {FIXED}
« Reply #6 on: April 03, 2014, 08:10:36 am »
well what are these bugs for example?


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Vehicle fix system TESTED {FIXED}
« Reply #7 on: April 03, 2014, 02:22:03 pm »
well what are these bugs for example?

[pawn]else if(strcmp(cmd, "!fix", true)==0)
{
    if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You're on foot");
    else {
        new Float:vhp, vid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vid, vhp);
        if(vhp == 1000) SendClientMessage(playerid, 0xFF0000AA, "Your vehicle is okay");
        else{
        new cash = GetPlayerMoney(playerid);
        if(cash <= 299) SendClientMessage(playerid, 0xFF0000AA, "You're poor buddy");
        else {
        SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
         SetVehicleHealth(vid, 1000);
         DecPlayerHandCash( playerid, 300 );}
         }
    }
}
[/pawn]

Did it work? Huh, amazing, I didnt know I can post working code from mobile phone

your cmd have got many bugs i fixed then it works :-)

its not nesk's code bug. that is a pawno code bug. in bbc code of pawno in forum..

the code works ..
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol