[Ajuda] Text Draw No Radar
#10

Jб que estou sem nada pra fazer eu fiz, ve se vai ae:

PHP код:
COMMAND:criarradar(playeridparams[])
{
// Setup local variables
new FloatFloat: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);
format(xRLsizeof(xRL), "Radar \nVelocidade Mбxima\n %i kmh"MaxSpeed);
Create3DTextLabel(xRL0xFFFFFFFFxyz150.000);  
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
Text Draw No Radar - by Lendario - 18.05.2013, 19:17
Re: Text Draw No Radar - by AlucardSnow - 18.05.2013, 19:20
Re: Text Draw No Radar - by Lendario - 18.05.2013, 19:21
Re: Text Draw No Radar - by AlucardSnow - 18.05.2013, 19:28
Re: Text Draw No Radar - by Lendario - 18.05.2013, 19:33
Re: Text Draw No Radar - by Lendario - 18.05.2013, 19:39
Re: Text Draw No Radar - by AlucardSnow - 18.05.2013, 19:39
Re: Text Draw No Radar - by Lendario - 18.05.2013, 19:41
Re: Text Draw No Radar - by smiiir - 18.05.2013, 19:44
Re: Text Draw No Radar - by AlucardSnow - 18.05.2013, 19:47
Re: Text Draw No Radar - by Lendario - 18.05.2013, 19:50
Re: Text Draw No Radar - by Lendario - 18.05.2013, 19:54
Re: Text Draw No Radar - by smiiir - 18.05.2013, 19:57
Re: Text Draw No Radar - by Lendario - 18.05.2013, 20:18
Re: Text Draw No Radar - by Lendario - 18.05.2013, 20:38

Forum Jump:


Users browsing this thread: 3 Guest(s)