[Ajuda] Gente Sou Novo Nisto Entao me Ajudem :D
#1

Ola gente Tudo bem ? Entao Queria ajuda em um comando Ai
Tipo Queria que aparece a velocidade no radar Tipo /criarradar 120 Dai aparece Velocidade maxima : 120 tem como por isto no comando ?



PHP код:
COMMAND:criarradar(playeridparams[])
{
    
// Setup local variables
    
new Float:xFloat:yFloat:zFloat:AngleMaxSpeedfile[100], File:PFileLineForFile[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(playerid0xFF0000AA"Digite: \"/criarradar <Velocidade>\"");
            else
            {
                
// Get player's position and facing angle
                
GetPlayerPos(playeridxyz);
                
GetPlayerFacingAngle(playeridAngle);
                
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(playeridx1.01.0);
                
// Save the camera to a file
                
for (new CamIDCamID MAX_CAMERASCamID++)
                {
                    
// Check if this index is free
                    
if (ACameras[CamID][CamSpeed] == 0)
                    {
                        
// Setup this camera (create the objects and store the data)
                        
SetupSpeedCamera(CamIDxyzAngleMaxSpeed);
                        
// Save the file
                        
format(filesizeof(file), CameraFileCamID); // Construct the complete filename for this camera-file
                        
PFile fopen(fileio_write); // Open the camera-file for writing
                        
format(LineForFile100"CamX %f\r\n"x);
                        
fwrite(PFileLineForFile); // And save it to the file
                        
format(LineForFile100"CamY %f\r\n"y);
                        
fwrite(PFileLineForFile); // And save it to the file
                        
format(LineForFile100"CamZ %f\r\n"z);
                        
fwrite(PFileLineForFile); // And save it to the file
                        
format(LineForFile100"CamAngle %f\r\n"Angle);
                        
fwrite(PFileLineForFile); // And save it to the file
                        
format(LineForFile100"CamSpeed %i\r\n"MaxSpeed);
                        
fwrite(PFileLineForFile); // And save it to the file
                        
fclose(PFile); // Close the file
                        // Let the player know he created a new camera
                        
format(Msg128"Voce Criou o Radar de ID: %i"CamID);
                        
SendClientMessage(playerid0x00FF00FFMsg);
                        
// 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(Msg128"{FF0000}Voce nao 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;

Reply
#2

up !!
Reply
#3

Ninguem ajuda ? aff
Reply
#4

Abra a include PPC_Common e procure por SetupSpeedCamera e adicione isso:
PHP код:
new Str[60];
format(Str,sizeof(Str),"{FFFFFF}Velocidade Mбxima:\n {FF0000}%i{FFFFFF} Km/h"ACameras[CamID][CamSpeed]); 
ACameras[CamID][CamText] = CreateDynamic3DTextLabel(Str0x008080FFACameras[CamID][CamX], ACameras[CamID][CamY], ACameras[CamID][CamZ]+560.0); 
Agora abra a include PPC_Defines e procure por ACameras e adicione isso acima de CamIcon:
PHP код:
Text3D:CamText
E no comando de apagar o radar adicione isso:
PHP код:
DestroyDynamic3DTextLabel(ACameras[CamID][CamText]); 
Reply
#5

Muito Obrigado Cara vc й de mais
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)