OnVehicleMod affects OnVehicleRespray bug?
#1

Specs:
[x] Client: SA:MP 0.3a
[x] 1st Server Test: 0.3a r4 (windows)
[x] 2st Server Test: 0.3a r7 (windows)
[x] 3rd Server Test: 0.3a R7 (linux) < NOT TESTED YET, because of the 2 failed attempts on windows.
[x] Pawno includes from 0.3a r4+ +w/ custom includes
[x] OnEnterExitModShop works 100% so ignore it...
_________________________________________________
Okay, before you start going net-Emo on me, first, here is the code i was dealing with (there is more story behind this, but i'll report on now)

http://sa-mp.pastebin.com/qMVEBcFi
or
Code:
//--- mods and stuff -----------------------------------------------------------

public OnVehicleMod(playerid,vehicleid,componentid)
{
  //printf("Vehicle %d was modded by ID %d with the componentid %d",vehicleid,playerid,componentid);
  new playerState = GetPlayerState(playerid);
  if(/*GetPlayerLevel(playerid) < 3 &&*/ playerState == PLAYER_STATE_DRIVER)
	{
		new string[128];

		format(string, sizeof(string),/* Now the message*/
		
		"CAR MOD REPORT: %s (ID %d) has Modded Vehicle [%d] with the componentid [%d]"
			
		/* now the rest */ ,PlayerName(playerid), playerid, vehicleid, componentid);
		SendAdminMessage(string);

		return 1;
	}
  
  return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
  //new string[48];
  //format(string, sizeof(string), "You sprayed vehicle %d to colors %d and %d!", vehicleid,color1,color2);
  //SendClientMessage(playerid, COLOR_GREEN, string);
  	new playerState = GetPlayerState(playerid);

  if(/*GetPlayerLevel(playerid) < 3 &&*/ playerState == PLAYER_STATE_DRIVER)
	{
		new string[126];
		format(string, sizeof(string),/* Now the message*/
		
		"CAR MOD REPORT: %s (ID %d) has sprayed vehicle [%d] to colors [%d] and [%d]"
		
		/* now the rest */,PlayerName(playerid), playerid, vehicleid,color1,color2);
		SendAdminMessage(string);
		return 1;
	}
  return 1;
}
public OnEnterExitModShop(playerid, enterexit, interiorid)
{
  // if(enterexit == 0) // If enterexit is 0, this means they are exiting
  	new playerState = GetPlayerState(playerid);
  if(/*GetPlayerLevel(playerid) < 3 &&*/ enterexit == 1 && playerState == PLAYER_STATE_DRIVER)
	{
		new string[126];
		format(string, sizeof(string),/* Now the message*/

		"CAR MOD REPORT: %s (ID %d) has entered: Transfender (Modding Shops)"

		/* now the rest */,PlayerName(playerid), playerid);
		SendAdminMessage(string);
		return 1;
	}
  if(/*GetPlayerLevel(playerid) < 3 &&*/ enterexit == 2 && playerState == PLAYER_STATE_DRIVER)
	{
		new string[126];
		format(string, sizeof(string),/* Now the message*/

		"CAR MOD REPORT: %s (ID %d) has entered: Loco Low (Modding Shops)"

		/* now the rest */,PlayerName(playerid), playerid);
		SendAdminMessage(string);
		return 1;
	}
  if(/*GetPlayerLevel(playerid) < 3 &&*/ enterexit == 3 && playerState == PLAYER_STATE_DRIVER)
	{
		new string[126];
		format(string, sizeof(string),/* Now the message*/

		"CAR MOD REPORT: %s (ID %d) has entered: Wheel Arch Angels (Modding Shops)"

		/* now the rest */,PlayerName(playerid), playerid);
		SendAdminMessage(string);
		return 1;
	}
  return 1;
}

// -----------------------------------------------------------------------------
_________________________________________________

Ok the issue:

When The vehicle enters, gives me the proper notification about entering the correct mod shop.

But When i am looking over the nitro or hydrolics it gives me the " vehicle sprayed blah blah when i haven't"

Selecting the components works ok.

When exiting the mod shop, i once again, get the damn vehicle sprayed thing....

screenshots below:




Resources from:
[x] https://sampwiki.blast.hk/wiki/OnVehicleMod
[x] https://sampwiki.blast.hk/wiki/OnVehicleRespray
[x] https://sampwiki.blast.hk/wiki/OnEnterExitModShop



[br][br]

~ Tenshi & thanks <3

Reply
#2

My blatant guess is that it is called due to the fact that you can RESPRAY your vehicle in the tuning menu.
Was the color 12 your actual vehicle color?

If you'd like to save all modifications including colour when exitting tuningshops, this is usefull.

I guess there's nothing gravely wrong with it.
Reply
#3

It is also called when you view a paint job.

Quote:
Originally Posted by //exora
My blatant guess is that it is called due to the fact that you can RESPRAY your vehicle in the tuning menu.
Was the color 12 your actual vehicle color?

If you'd like to save all modifications including colour when exitting tuningshops, this is usefull.

I guess there's nothing gravely wrong with it.
That's true, but isn't it a bug that it is called after you exit the modshop and drive out of it?
Reply
#4

Quote:
Originally Posted by BeckzyBoi
That's true, but isn't it a bug that it is called after you exit the modshop and drive out of it?
Yes there is a bug when you exit the modshop
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)