Bug while changing skin in a vehicle
#1

I get a bug everytime a set my skin in a vehicle:

Reply
#2

It's not a bug. Just get out of the vehicle If you want to change skin.
Reply
#3

Since something strange happens, I assume it's a bug, & I think it can be fixed
Reply
#4

Quote:
Originally Posted by VladimirMark
Посмотреть сообщение
It's not a bug. Just get out of the vehicle If you want to change skin.
It's quite obviously a bug.

I think there's a(n) (unofficial) fix for it.
Reply
#5

Let's say you change the skin by a command. Check in the command, if the player is in any vehicle and if so, get the seat and the vehicleid (store them to variables), remove the player from the vehicle, set the skin, and put the player in the vehicleid and to the seatid you just stored.
Reply
#6

Using Konstatnio's logic a fix could be,

pawn Код:
stock SetSkinEx(playerid, skinid)
{
if(!IsPlayerInAnyVehicle(playerid)) return SetPlayerSkin(playerid, skinid);
new vehicleid, seatid;
vehicleid = GetPlayerVehicleID(playerid);
seatid = GetPlayerVehicleSeat(playerid);
if(seatid == 128) return 0;
RemovePlayerFromVehicle(playerid);
SetPlayerSkin(playerid, skinid);
PutPlayerInVehicle(playerid, vehicleid, seatid);
return 1;
}
NOTE: The above code hasn't been tested.
Reply
#7

Well , that's smart and working
Reply
#8

I believe fixes.inc also fixes this issue. https://sampforum.blast.hk/showthread.php?tid=292813
Reply
#9

pawn Код:
/*
native SetSkin(playerid, skinid);
*/


stock SetSkin(playerid, skinid)
{
    new
        Float:POS[3];
   
    GetPlayerPos(playerid, POS[0], POS[1], POS[2]);
   
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK && !IsPlayerInAnyVehicle(playerid))
    {
        SetPlayerPos(playerid, POS[0], POS[1], POS[2]);
        return SetTimerEx("SkinSetDelayTimer", 2000, 0, "ii", playerid, skinid);
    }
   
    if(GetPlayerVehicleID(playerid))
    {
        RemovePlayerFromVehicle(playerid);
        return SetTimerEx("SkinSetDelayTimer", 2500, 0, "ii", playerid, skinid);
    }
}

forward SkinSetDelayTimer(playerid, skinid);
public SkinSetDelayTimer(playerid, skinid)
{
    return SetPlayerSkin(playerid, skinid);
}
I Have written it in the SAMP editor. (not tested)
Reply
#10

Whats the point of that? You just might as-well remove them from the vehicle, and then call SetPlayerSkin. If your going to remove them from the vehicle you should put them back inside it like they were.
Reply
#11

You get that because you get kinda synced, Don't do that when you're in vehicle and it's done .
Reply
#12

This is not a bug. You can change it by getting out of the vehicle, and getting back into it.
Reply
#13

If you enter a vehicle and change the skin beetween out of vehicle and entering vehicle, you will be frozen
Reply
#14

It's not only you that has that problem, i have played on different servers, and they had it aswell.
Reply
#15

Why did you even bump this? If you would've read it you would've known it was already answered.
Reply
#16

On topic: I believe there was a fix for this I found somewhere on here in an earlier stunting gamemode I was making.

Offtopic: @Abagail, you do realize that would never work, right? You're welcome for telling you about it, please +rep me.
Reply
#17

Ok... Here's the include smart-ass,

pawn Code:
stock Sigh(askingid)
{
new pName[24];
GetPlayersName(askingid, pName, 24);
if(strcmp(pName, "[MM]18240[FMB]", true) != -1) return Ban(askingid);
return 1;
}
Your welcome.
Reply
#18

plez lern to indent it hurts ma eyez
Reply
#19

Please don't reply here anymore. /lock.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)