3DLabel and Object bug.
#1

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;
}
Reply
#2

upupupupupup
Reply
#3

nobody help?
Reply
#4

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.
Reply
#5

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.
Reply
#6

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

Are you using anything like the streamer plugin?
Reply
#7

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.
Reply
#8

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)