[Ajuda] Radar Invisivel // VIP Bugado
#1

Bom, Vim pedir ajuda de vocкs pois meu radar estб bugado, Eu crio um radar й ele fica invisivel gostaria que alguem mim ajuda-se nisso.

PHP код:
COMMAND:criarradar(playeridparams[])
{
    new 
Float:xFloat:yFloat:zFloat:AngleMaxSpeedfile[100], File:PFileLineForFile[100], Msg[128];
    if (
APlayerData[playerid][LoggedIn] == true)
    {
        if (
APlayerData[playerid][PlayerLevel] >= 5)
        {
            if (
sscanf(params"i"MaxSpeed)) SendClientMessage(playerid0xFF0000AA"{FFFF00}[INFO] {009D4F}Use: /criarradar [60 Cidade, 90 Estrada, 120 Rodovia]");
            else
            {
                
GetPlayerPos(playeridxyz);
                
GetPlayerFacingAngle(playeridAngle);
                
1.0;
                
SetPlayerPos(playeridx1.01.0);
                for (new 
CamIDCamID MAX_CAMERASCamID++)
                {
                    if (
ACameras[CamID][CamSpeed] == 0)
                    {
                        
SetupSpeedCamera(CamIDxyzAngleMaxSpeed);
                        
format(filesizeof(file), CameraFileCamID); 
                        
PFile fopen(fileio_write); 
                        
format(LineForFile100"CamX %f\r\n"x);
                        
fwrite(PFileLineForFile); 
                        
format(LineForFile100"CamY %f\r\n"y);
                        
fwrite(PFileLineForFile); 
                        
format(LineForFile100"CamZ %f\r\n"z);
                        
fwrite(PFileLineForFile); 
                        
format(LineForFile100"CamAngle %f\r\n"Angle);
                        
fwrite(PFileLineForFile); 
                        
format(LineForFile100"CamSpeed %i\r\n"MaxSpeed);
                        
fwrite(PFileLineForFile); 
                        
fclose(PFile); 
                        
format(Msg128"{FFFF00}[INFO] {009D4F}Vocк criou o radar ID: %i"CamID);
                        
SendClientMessage(playerid0x00FF00FFMsg);
                        return 
1;
                    }
                }
                
// In case all camera-slots are occupied (100 camera's have been created already), let the player know about it
                
format(Msg128"{FFFF00}[INFO] {009D4F}Vocк nгo pode criar mais de %i radares."MAX_CAMERAS);
                
SendClientMessage(playerid0xFFFFFFFFMsg);
            }
        }
        else
            return 
0;
    }
    else
        return 
0;
    
// Let the server know that this was a valid command
    
return 1;

Jб mudei para uns 500 outros /criarradar й nгo funfou






Bom, Vim pedir ajuda de vocкs pois filterscript de VIP estб bugado, Eu dou VIP para um player mais nгo vai, gostaria que alguem mim ajuda-se nisso.





PHP код:
/* Include's */
#include <a_samp>
#include <zcmd>
#include <sscanf>
#include <DOF2>
/* New's */
new PlayerVip[MAX_PLAYERS];
/* Public's */
main(){}
public 
OnFilterScriptInit() return 1;
public 
OnFilterScriptExit() { DOF2_Exit(); return 1; }
public 
OnPlayerConnect(playerid)
{
    new 
string[80];
    
format(stringsizeof(string), "/vips/%s.ini"GetName(playerid));
    if(
DOF2_FileExists(string))
    {
        
PlayerVip[playerid] = DOF2_GetInt(string,"VipExpira");
        if(
gettime() > PlayerVip[playerid])
        {
            
DOF2_RemoveFile(string);
            
PlayerVip[playerid] = 0;
            
SendClientMessage(playerid, -1"{A62CF2}VIP{FFFF00} Seu vip expirou!");
        }
        else
        {
            
format(stringsizeof(string), "{A62CF2}VIP{FFFF00} Seu vip expira em %s."convertNumber(PlayerVip[playerid]-gettime()));
            
SendClientMessage(playerid, -1string);
        }
    }
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    if(
PlayerVip[playerid] > 0)
    {
        if(
gettime() > PlayerVip[playerid])
        {
            new 
string[40];
            
format(stringsizeof(string), "/vips/%s.ini"GetName(playerid));
            
DOF2_RemoveFile(string);
            
PlayerVip[playerid] = 0;
            
SendClientMessage(playerid, -1"{A62CF2}VIP{FFFF00} Seu vip expirou!");
        }
        else
        {
            
SetPlayerArmour(playerid100);
            
SetPlayerHealth(playerid100);
        }
    }
    return 
1;
}
/* Stock's */
stock ConvertDays(dias)
{
    new
        
valueday 86400*dias,
        
daysconvert,
        
gtime gettime()
    ;
    
#emit LOAD.S.PRI gtime
    #emit LOAD.S.ALT valueday
    #emit ADD
    #emit STOR.S.PRI daysconvert
    
return daysconvert;
}
stock convertNumber(n)
{
    new 
diahrmnsegresto;
    
resto n;
    
seg resto 60;
    
resto /= 60;
    
mn resto 60;
    
resto /= 60;
    
hr resto 24;
    
resto /= 24;
    
dia resto;
    new 
str[50];
    
format(strsizeof(str), "%ddias, %02dh %02dm %02ds"diahrmnseg);
    return 
str;
}
stock GetName(playerid)
{
    new 
name[24];
    
GetPlayerName(playeridnamesizeof(name));
    return 
name;
}
/* Command's */
CMD:vips(playerid)
{
    new 
string[85];
    new 
count;
    
SendClientMessage(playerid, -1"{A62CF2}VIP{FFFF00} Jogadores VIP's Online:");
    for(new 
0MAX_PLAYERSi++)
    {
        if(
PlayerVip[i] > 0)
        {
            if(
IsPlayerConnected(i))
               {
                
format(stringsizeof(string), "Vip %s (%d) [%s]"GetName(i), iconvertNumber(PlayerVip[i]-gettime()));
                
SendClientMessage(playerid0xE3E3E3FFstring);
                
count++;
               }
        }
    }
    if(
count == 0)
        return 
SendClientMessage(playerid, -1"{A62CF2}VIP{FFFF00} Nгo tem nenhum jogador vip on-line!");
    return 
true;
}
CMD:darvip(playeridparams[])
{
    new 
iddaysstring[70];
    if(!
IsPlayerAdmin(playerid))
    
        return 
SendClientMessage(playerid, -1"{A62CF2}VIP{FFFF00} Vocк precisa estar logado na RCON para usar este comando!");
    if(
sscanf(params"ud"iddays))
        return 
SendClientMessage(playerid, -1"{FFFF00}[INFO]{009D4F} /darvip [ID] [Dias]");
    if(
days 0)
    {
        return 
SendClientMessage(playerid, -1"{A62CF2}VIP{FFFF00} Este jogador nгo estб online!");
    }
    else
    {
        if(!
IsPlayerConnected(id))
            return 
SendClientMessage(playerid, -1"{A62CF2}VIP{FFFF00} Este jogador nгo estб online!");
        else
        {
            
PlayerVip[id] = ConvertDays(days);
            
format(stringsizeof(string), "{A62CF2}VIP{FFFF00} Vocк deu %d dias de VIP para %s."daysGetName(id));
            
SendClientMessage(playerid, -1string);
            
format(stringsizeof(string), "{A62CF2}VIP{FFFF00} Vocк recebeu %d dias de VIP."days);
            
SendClientMessage(playerid, -1string);
            
format(stringsizeof(string), "/vips/%s.ini"GetName(id));
            
DOF2_CreateFile(string);
            
DOF2_SetInt(string,"VipExpira"PlayerVip[id]);
            
DOF2_SaveFile();
        }
    }
    return 
true;

Reply
#2

Vou analizar.
Reply
#3

Quote:
Originally Posted by DanDRT
Посмотреть сообщение
Ta vendo vocк, falou que o mano plagiou e copiou um FS que postei e pois como se fosse seu.. (so mudou mensagens e nomes).
Mano, Eu nгo tirei os crйditos й falei que eu que criei --'
Reply
#4

Quote:
Originally Posted by Helbim
Посмотреть сообщение
Mano, Eu nгo tirei os crйditos й falei que eu que criei --'
Li errado, e ja editei б alguns minutos.

https://sampforum.blast.hk/showthread.php?tid=468710
https://sampforum.blast.hk/showthread.php?tid=469343
Olhe isto.
Reply
#5

atualizar o plugin streamer,sscanf e tbm as includes para versao 0.3x para os radares fucionar mais ja o vip nao sei
Reply
#6

Quote:
Originally Posted by thift
Посмотреть сообщение
atualizar o plugin streamer,sscanf e tbm as includes para versao 0.3x para os radares fucionar mais ja o vip nao sei
Baixei as plugins streamer й sscanf em 0.3x, mais deu Unknown (Sei lб como escreve -.-')no meu GM
Reply
#7

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

Quote:
Originally Posted by Helbim
Посмотреть сообщение
O meu tambйm rsrs



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

No SetupSpeedCamera tem dois CreateObject , muda para CreateDynamicObject.
Reply
#10

Quote:
Originally Posted by Don_Speed
Посмотреть сообщение



No SetupSpeedCamera tem dois CreateObject , muda para CreateDynamicObject.
Continua a mesma coisa
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)