Meu fih, enttenda eu tenho outro GM que tem o mesmo comando!
E cria o radar de boa! Jб tentei transferir o comando do outro GM pro meu! Mas nгo apareзe de jeito nenhum ¬¬' Ajuda ae! |
Cara se tu fica flando deste geito com os caras assim eles nao vao te ajudar , o cmd esta correto o problema e na sua callback!
|
Nao aparece pq vc n soube adaptar corretamente, manda ae, pra nos ajudar
|
COMMAND:criarradar(playerid, params[]) { new Float, Float:y, Float:z, Float:Angle, MaxSpeed, file[100], File:PFile, LineForFile[100], Msg[128]; if (APlayerData[playerid][LoggedIn] == true) { if (APlayerData[playerid][PlayerLevel] >= 7) { if (sscanf(params, "i", MaxSpeed)) SendClientMessage(playerid, 0xFF0000AA, "Use: /criarradar [Vel.Max]"); else { GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, Angle); z = z - 1.0; SetPlayerPos(playerid, x, y + 1.0, z + 1.0); for (new CamID; CamID < MAX_CAMERAS; CamID++) { if (ACameras[CamID][CamSpeed] == 0) { SetupSpeedCamera(CamID, x, y, z, Angle, MaxSpeed); format(file, sizeof(file), CameraFile, CamID); PFile = fopen(file, io_write); format(LineForFile, 100, "CamX %f\r\n", x); fwrite(PFile, LineForFile); format(LineForFile, 100, "CamY %f\r\n", y); fwrite(PFile, LineForFile); format(LineForFile, 100, "CamZ %f\r\n", z); fwrite(PFile, LineForFile); format(LineForFile, 100, "CamAngle %f\r\n", Angle); fwrite(PFile, LineForFile); format(LineForFile, 100, "CamSpeed %i\r\n", MaxSpeed); fwrite(PFile, LineForFile); fclose(PFile); format(Msg, 128, "Vocк criou o radar ID: %i", CamID); SendClientMessage(playerid, 0x00FF00FF, Msg); 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} Vocк nгo pode criar mais de %i radares.", MAX_CAMERAS); SendClientMessage(playerid, 0xFFFFFFFF, Msg); } } else return 0; } else return 0; // Let the server know that this was a valid command return 1; } |
SetupSpeedCamera(CamID, Float, Float:y, Float:z, Float:rot, MaxSpeed) { // Store all the given values ACameras[CamID][CamX] = x; ACameras[CamID][CamY] = y; ACameras[CamID][CamZ] = z; ACameras[CamID][CamAngle] = rot; ACameras[CamID][CamSpeed] = MaxSpeed; // Create both camera objects and store their reference ACameras[CamID][CamObj1] = CreateObject(18880, x, y, z, 0.0, 0.0, rot); ACameras[CamID][CamObj2] = CreateObject(18880, x, y, z, 0.0, 0.0, rot + 180.0); } |