SA-MP Forums Archive
3DLabel and Object bug. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3DLabel and Object bug. (/showthread.php?tid=607979)



3DLabel and Object bug. - SetPlayerNameTag - 26.05.2016

3dlabel:

I made a carsign script I found a few bugs about it:

1. Attach3DLabelToVehicle disappears when a player connect.
2. Label disappears when a player enter buidling (I dont know if it happens just got a bug report from player)
3. Label replaces with player's name

Object:

In my script, I can't create object in-game in somewhere (Idlewood and Ganton as far as I know)
I don't know why, I didnt set anything about it.

For carsign:

Код HTML:
COMMAND:carsign(playerid, params[])
{
    if(GetPVarInt(playerid, "PlayerLogged") == 0) return 1;
	if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
	if(GetPVarInt(playerid, "Duty") != 1) return 1;
    if(VehicleInfo[GetPlayerVehicleID(playerid)][vType] != VEHICLE_LSPD) return 1;
    if(GetPVarInt(playerid, "Delay") > GetCount()) return 1;
	new txt[50];
	if(sscanf(params, "s[50]", txt)) SendClientMessage(playerid, COLOR_GREY, "useage: /carsign [callsign]");
	else
	{
	    if((GetPVarInt(playerid, "Member") == 1 && GetPVarInt(playerid, "Rank") >= 2) || GetPVarInt(playerid, "Member") == 2)
	    {
	        SetPVarInt(playerid, "Delay", GetCount()+2000);
	        new getcar = GetPlayerVehicleID(playerid);
			if(VehicleInfo[getcar][vUText] == 0) {
                VehicleInfo[getcar][vUText]=1;
                VehicleInfo[getcar][vCText] = Create3DTextLabel(txt, -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
                Attach3DTextLabelToVehicle(VehicleInfo[getcar][vCText], getcar, -0.8, -2.8, -0.3);
                scm(playerid, -1, "CARSIGN ADDED!");
            } else {
            VehicleInfo[getcar][vUText]=0;
            Delete3DTextLabel(VehicleInfo[getcar][vCText]);
			scm(playerid, -1, "CARSIGN REMOVED!"); }
	    }
	    else SendClientMessage(playerid, COLOR_LIGHTRED, "NO PERMISSION! (LEOs Only)");
	}
	return 1;
}



Re: 3DLabel and Object bug. - SetPlayerNameTag - 26.05.2016

upupupupupup


Re: 3DLabel and Object bug. - SetPlayerNameTag - 27.05.2016

nobody help?


Re: 3DLabel and Object bug. - Sew_Sumi - 27.05.2016

Quote:
Originally Posted by SetPlayerNameTag
Посмотреть сообщение
Код:
VehicleInfo[getcar][vCText] = Create3DTextLabel(txt, -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
testLOS 0/1 Test the line-of-sight so this text can't be seen through objects

Last parameter is why they can't see it through a wall...

Other than that though, I'd highly suspect that it's all to do with your code. Not the code shown here, but elsewhere.


Re: 3DLabel and Object bug. - SetPlayerNameTag - 07.06.2016

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
testLOS 0/1 Test the line-of-sight so this text can't be seen through objects

Last parameter is why they can't see it through a wall...

Other than that though, I'd highly suspect that it's all to do with your code. Not the code shown here, but elsewhere.
Nah.. 3DLabel has a serious bug like sometime, the text of 3DLabel changes to other 3dlabels, I don't know why I didnt set it.


Re: 3DLabel and Object bug. - Sew_Sumi - 07.06.2016

I'd still say it's got more to do with scripting errors.

Are you using anything like the streamer plugin?


Re: 3DLabel and Object bug. - SetPlayerNameTag - 11.06.2016

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
I'd still say it's got more to do with scripting errors.

Are you using anything like the streamer plugin?
I have.


Re: 3DLabel and Object bug. - Sew_Sumi - 11.06.2016

Quote:
Originally Posted by SetPlayerNameTag
Посмотреть сообщение
I have.
Then read the instructions, and don't use the native SA-MP functions, when you are replacing them with the plugin...