Author Topic: Vehicle Fixing [ 5 Seconds ] [ Working ] [ By me ]  (Read 3843 times)

0 Members and 1 Guest are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Vehicle Fixing [ 5 Seconds ] [ Working ] [ By me ]
« on: April 03, 2014, 03:13:42 pm »
Add

Code: [Select]
Fixing[MAX_VEHICLES];
command [ put in OnPlayerCommand ]

Code: [Select]
    else if (strcmp(cmd, "fix", true) == 0) {
if(Fixing[GetPlayerVehicleID(playerid)] == 1) SendClientMessage(playerid,COLOR_RED," Already Fixing This Vehicle ");
else if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid,COLOR_RED," Not In Vehicle ");
else {
Fixing[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,COLOR_RED," Fixing ");
SetTimer("VehicleFixing", 10000, 0);
}
    return 1;
    }

Timer

Code: [Select]
forward VehicleFixing();
public VehicleFixing() {
for(new i ; i <MAX_VEHICLES;i++) {
if(Fixing[i] == 1) {
SetVehicleHealth(i, 1000);
SendClientMessageToAll(COLOR_GREEN," Vehicle Has Been Fixed ");
SetVehicleTyre(i,1);
Fixing[i] = 0;
}
}
return 1;
}

Credits : ME
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: Vehicle Fixing [ 5 Seconds ] [ Working ] [ By me ]
« Reply #1 on: April 04, 2014, 12:29:01 am »
Excuse the question, what you gain by copying others?  ???

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Vehicle Fixing [ 5 Seconds ] [ Working ] [ By me ]
« Reply #2 on: April 04, 2014, 01:30:27 am »
Excuse the question, what you gain by copying others?  ???
Problem?

Besides..

its a working timer,

not like others...

besides its all change one
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: Vehicle Fixing [ 5 Seconds ] [ Working ] [ By me ]
« Reply #3 on: April 04, 2014, 01:53:02 am »
Are you cant see storm topic ?. You cant add SetTimers on Cmd. It only works on ongamemodeinit.
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Vehicle Fixing [ 5 Seconds ] [ Working ] [ By me ]
« Reply #4 on: April 04, 2014, 02:46:28 am »
Are you cant see storm topic ?. You cant add SetTimers on Cmd. It only works on ongamemodeinit.

Not inherently true, but this timer really should only be set in OnGameModeInit. What I said was this:

Quote
You cannot pass an argument to a timer in VC:MP 0.3z r2
Do not PM me for support.




Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: Vehicle Fixing [ 5 Seconds ] [ Working ] [ By me ]
« Reply #5 on: August 16, 2014, 03:47:09 pm »
Add

Code: [Select]
Fixing[MAX_VEHICLES];
command [ put in OnPlayerCommand ]

Code: [Select]
    else if (strcmp(cmd, "fix", true) == 0) {
if(Fixing[GetPlayerVehicleID(playerid)] == 1) SendClientMessage(playerid,COLOR_RED," Already Fixing This Vehicle ");
else if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid,COLOR_RED," Not In Vehicle ");
else {
Fixing[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,COLOR_RED," Fixing ");
SetTimer("VehicleFixing", 10000, 0);
}
    return 1;
    }

Timer

Code: [Select]
forward VehicleFixing();
public VehicleFixing() {
for(new i ; i <MAX_VEHICLES;i++) {
if(Fixing[i] == 1) {
SetVehicleHealth(i, 1000);
SendClientMessageToAll(COLOR_GREEN," Vehicle Has Been Fixed ");
SetVehicleTyre(i,1);
Fixing[i] = 0;
}
}
return 1;
}

Credits : ME
Bugged !
player1: !fix
after few secs
player2: !fix
player2 healed instantly!!!
I am NE.CrystalBlue!!!
Quote
i cant able to understand