[Ajuda] Radar Invisivel // VIP Bugado
#8

Quote:
Originally Posted by CLANdok
Посмотреть сообщение
Tenta esse,ele fala a velocidade do radar Dinamicamente com 3DTextLabel:
pawn Код:
COMMAND:criarradar(playerid, params[])
{
    // Setup local variables
    new Float:y, Float:z, Float:Angle, MaxSpeed, file[100], File:PFile, LineForFile[100], Msg[128];
    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/criarradar", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        // Check if the player's admin-level is at least 5
        if (APlayerData[playerid][PlayerLevel] >= 5)
        {
            if (sscanf(params, "i", MaxSpeed)) SendClientMessage(playerid, 0xFF0000AA, "Digite: \"/criarradar <Velocidade>\"");
            else
            {
                // Get player's position and facing angle
                new xRL [ 128 ], Float:x ;
                GetPlayerFacingAngle(playerid, Angle);
                GetPlayerPos(playerid,x,y,z);
                format(xRL, sizeof(xRL), "{FF0000}Radar:{FFFFFF} \nVelocidade Mбxima:\n {00FF00}%i Kmh", MaxSpeed);
                Create3DTextLabel(xRL, 0xFFFFFFFF, x, y, z, 150.0, 0, 0);
                z = z - 1.0; // Adjust camera Z-coordinate 1m lower than normal (otherwise the camera floats in the air)

                // Move the player a bit, otherwise he could get stuck inside the camera-object
                SetPlayerPos(playerid, x, y + 1.0, z + 1.0);

                // Save the camera to a file
                for (new CamID; CamID < MAX_CAMERAS; CamID++)
                {
                    // Check if this index is free
                    if (ACameras[CamID][CamSpeed] == 0)
                    {
                        // Setup this camera (create the objects and store the data)
                        SetupSpeedCamera(CamID, x, y, z, Angle, MaxSpeed);

                        // Save the file
                        format(file, sizeof(file), CameraFile, CamID); // Construct the complete filename for this camera-file

                        PFile = fopen(file, io_write); // Open the camera-file for writing

                        format(LineForFile, 100, "CamX %f\r\n", x);
                        fwrite(PFile, LineForFile); // And save it to the file
                        format(LineForFile, 100, "CamY %f\r\n", y);
                        fwrite(PFile, LineForFile); // And save it to the file
                        format(LineForFile, 100, "CamZ %f\r\n", z);
                        fwrite(PFile, LineForFile); // And save it to the file
                        format(LineForFile, 100, "CamAngle %f\r\n", Angle);
                        fwrite(PFile, LineForFile); // And save it to the file
                        format(LineForFile, 100, "CamSpeed %i\r\n", MaxSpeed);
                        fwrite(PFile, LineForFile); // And save it to the file

                        fclose(PFile); // Close the file

                        // Let the player know he created a new camera
                        format(Msg, 128, "Voce Criou o Radar de ID: %i", CamID);
                        SendClientMessage(playerid, 0x00FF00FF, Msg);

                        // Exit the function
                        return 1;
                    }
                }

                // In case all camera-slots are occupied (100 camera's have been created already), let the player know about it
                format(Msg, 128, "{FF0000}Voce nao Pode Criar mais de %i Radares", MAX_CAMERAS);
                SendClientMessage(playerid, 0xFFFFFFFF, Msg);
            }
        }
        else
        return 0;
    }
    else
    return 0;

    return 1;
}
O meu tambйm rsrs

Quote:
Originally Posted by mau.tito
Посмотреть сообщение
O problema nгo e na criaзгo do radar e sim na hora de fazer ele ser criado , na callback SetupSpeedCamera.
Vocк sabe algum SetupSpeedCamera sem estб bugado mano?
Olha o meu ae:

PHP код:
SetupSpeedCamera(CamIDFloat:xFloat:yFloat:zFloat:rotMaxSpeed)
{
    
ACameras[CamID][CamX] = x;
    
ACameras[CamID][CamY] = y;
    
ACameras[CamID][CamZ] = z;
    
ACameras[CamID][CamAngle] = rot;
    
ACameras[CamID][CamSpeed] = MaxSpeed;
    
ACameras[CamID][CamObj1] = CreateObject(18880xyz0.00.0rot);
    
ACameras[CamID][CamObj2] = CreateObject(18880xyz0.00.0rot 180.0);
    
ACameras[CamID][CamIcon] = CreateDynamicMapIcon(xyz34000, -1150.0);
new 
str[47];
format (str,sizeof(str),"{FF0000}Vel. Mбxima\n{FFFF00}%i {FF0000}Km/H"ACameras[CamID][CamSpeed]);
Create3DTextLabel(str0x008080FFACameras[CamID][CamX], ACameras[CamID][CamY], ACameras[CamID][CamZ], 40.000);



#Edit
Jб mudei para um que funfa que й do Brasil Truck й ainda fica invisivel, Acho que o poblema nгo й nele
Reply


Messages In This Thread
Radar Invisivel // VIP Bugado - by Helbim - 24.10.2013, 22:02
Respuesta: Radar Invisivel // VIP Bugado - by DanDRT - 24.10.2013, 22:05
Re: Respuesta: Radar Invisivel // VIP Bugado - by Helbim - 24.10.2013, 22:06
Respuesta: Radar Invisivel // VIP Bugado - by DanDRT - 24.10.2013, 22:09
Re: Radar Invisivel // VIP Bugado - by thift - 24.10.2013, 22:50
Re: Radar Invisivel // VIP Bugado - by Helbim - 25.10.2013, 00:15
Re: Radar Invisivel // VIP Bugado - by CLANdok - 25.10.2013, 07:57
Re: Radar Invisivel // VIP Bugado - by Helbim - 25.10.2013, 13:41
Re: Radar Invisivel // VIP Bugado - by Don_Speed - 25.10.2013, 14:31
Re: Radar Invisivel // VIP Bugado - by Helbim - 25.10.2013, 15:25

Forum Jump:


Users browsing this thread: 1 Guest(s)