Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

3DLabel and Object bug.

$
0
0
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 Code:

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;
}


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>