28.06.2014, 12:57
Bom ta dando bug o 3DLabel nгo funciona e tб com uns warnings,quem puder me ajudar,muito grato.
Код:
CMD:criarradar(playerid, params[]) { if (APlayerData[playerid][LoggedIn] != true) return SendClientMessage(playerid, -1, "{FFFF00}[ERRO] {009D4F}Vocк nгo estб logado!"); // Setup local variables new Float:x, Float:y, Float:z, Float:Angle, MaxSpeed, file[100], File:PFile, LineForFile[100], Msg[128]; if (APlayerData[playerid][PlayerJailed] != 0) return SendClientMessage(playerid, COR_ERRO, "[ERRO] Vocк nгo pode usar esse comando na cadeia!"); if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 5 if(CallRemoteFunction("PegarLevelNovo","i",playerid) < 5) return SendClientMessage(playerid, -1, "{FF0000}[ERRO]: Vocк nгo tem permissгo para isso!"); if (sscanf(params, "i", MaxSpeed)) SendClientMessage(playerid, 0xFF0000AA, "Use: \"/criarradar <Velocidade>\""); else { GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, Angle); z = z - 1.0; // Adjust camera Z-coordinate 1m lower than normal (otherwise the camera floats in the air) static xPos[3]; GetPlayerPos(playerid, xPos[0], xPos[1], xPos[2]); Create3DTextLabel("Radar \nVelocidade Mбxima\n 120 kmh ", 0xFFFFFFFF, xPos[0], xPos[1], xPos[2], 150.0, 0, 0); // 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, "{FFFF00}[INFO] {009D4F}Vocк criou a camera 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, "{FFFF00}[ERRO] {009D4F}Vocк nгo pode criar mais de %i cameras", MAX_CAMERAS); SendClientMessage(playerid, 0xFFFFFFFF, Msg); } } else return 0; return 1; }
Код:
(5871) : warning 217: loose indentation (5871) : warning 213: tag mismatch (5871) : warning 213: tag mismatch (5871) : warning 213: tag mismatch (5875) : warning 217: loose indentation (5878) : warning 217: loose indentation 6 Warnings.
Код:
(5871) GetPlayerPos(playerid, xPos[0], xPos[1], xPos[2]); (5875) SetPlayerPos(playerid, x, y + 1.0, z + 1.0); (5878) for (new CamID; CamID < MAX_CAMERAS; CamID++)