Problem's with fuel
#1

I have problem's with fuel, it's not seting fuel. not even to one vehicle.

Код:
public OnVehicleSpawn(vehicleid)
{
	new vID = GetVehicleModel(vehicleid);
	if(Car(vID))
	{
	Fuel[vehicleid] = 50;
	}
	if(Bike(vID))
 	{
 	Fuel[vehicleid] = 30;
 	}
	if(HeavyVehicles(vID))
	{
	Fuel[vehicleid] = 200;
	}
	if(Boat(vID))
	{
	Fuel[vehicleid] = 250;
	}
	if(Airplane(vID))
	{
	Fuel[vehicleid] = 1000;
	}
	HelpFuel[vehicleid] = 9;
	Engine[vehicleid] = 0;
	Lights[vehicleid] = 0;
	return 1;
}
I made command

Код:
CMD:fueltest(playerid,params[])
{
	new vID = GetPlayerVehicleID(playerid);
	Fuel[vID] = 50;
	return true;
}
and it's seting, but problem is that i have to type that command 2 times..

I need help with this, to make setting fuel right.

Sorry for my bad english, I hope that you have understand me.
Reply
#2

BUMP! Help Please!
Reply
#3

why you're returning true why not return 1; ?
Reply
#4

it's same 1 mean's true, 0 mean's false.
Reply
#5

May I see the stock you're using to check the vehicle types? (just one)
Reply
#6

As specified by the wiki: OnVehicleSpawn is called when a vehicle respawns.
Reply
#7

I't was under ongamemodeinit before, and it's now under onvehiclespawn,

this variable HelpFuel was setting, so i know that problem is somewhere in check, but i don't know did u screwed up with my stock or with check's under onvehiclespawn...

Код:
HelpFuel[vehicleid] = 9;
Here is one of those stock's..

Код:
stock Car(vehicleid)
{
	new v = GetVehicleModel(vehicleid);
	if(v == 400 || v == 404 || v == 405 || v == 409 || v == 415 ||
	   v == 418 || v == 424 || v == 426 || v == 429 || v == 410 ||
	   v == 411 || v == 412 || v == 413 || v == 419 || v == 420 ||
	   v == 421 || v == 422 || v == 401 || v == 402 || v == 424 ||
	   v == 426 || v == 429 || v == 434 || v == 436 || v == 438 ||
	   v == 439 || v == 442 || v == 445 || v == 451 || v == 457 ||
	   v == 458 || v == 466 || v == 467 || v == 470 || v == 474 ||
	   v == 475 || v == 477 || v == 478 || v == 479 || v == 480 ||
	   v == 485 || v == 489 || v == 490 || v == 491 || v == 492 ||
	   v == 494 || v == 495 || v == 496 || v == 500 || v == 502 ||
	   v == 503 || v == 504 || v == 505 || v == 506 || v == 507 ||
	   v == 516 || v == 517 || v == 518 || v == 526 || v == 527 ||
	   v == 528 || v == 529 || v == 530 || v == 531 || v == 533 ||
	   v == 534 || v == 535 || v == 536 || v == 539 || v == 540 ||
	   v == 541 || v == 542 || v == 543 || v == 545 || v == 546 ||
	   v == 547 || v == 549 || v == 550 || v == 551 || v == 552 ||
	   v == 554 || v == 555 || v == 559 || v == 558 || v == 560 ||
	   v == 561 || v == 562 || v == 565 || v == 566 || v == 567 ||
	   v == 568 || v == 571 || v == 572 || v == 573 || v == 574 ||
	   v == 575 || v == 579 || v == 580 || v == 582 || v == 583 ||
	   v == 585 || v == 587 || v == 589 || v == 596 || v == 597 ||
	   v == 598 || v == 599 || v == 600 || v == 602 || v == 603 ||
	   v == 604 || v == 605) return true;
	   return false;
}
Reply
#8

post the errors
Reply
#9

I don't have errors.
Reply
#10

Sorry for bumping, but is there anyone who know's this?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)