[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


Messages In This Thread
Gente Sou Novo Nisto Entao me Ajudem :D - by giovanehen - 02.02.2014, 12:19
Re: Gente Sou Novo Nisto Entao me Ajudem :D - by giovanehen - 02.02.2014, 13:03
Re: Gente Sou Novo Nisto Entao me Ajudem :D - by giovanehen - 02.02.2014, 14:02
Re: Gente Sou Novo Nisto Entao me Ajudem :D - by Mathsss - 02.02.2014, 14:11
Re: Gente Sou Novo Nisto Entao me Ajudem :D - by giovanehen - 02.02.2014, 14:30

Forum Jump:


Users browsing this thread: 3 Guest(s)